WIP: working on libide (makefile)
This commit is contained in:
parent
1ad7c1eabb
commit
1d6ca0b8f7
28
Makefile
28
Makefile
|
@ -43,17 +43,23 @@ CC=gcc
|
|||
WARNINGS= -Wall
|
||||
DEBUG= -ggdb -fno-omit-frame-pointer -fdiagnostics-color=always
|
||||
OPTIMIZE= -O3
|
||||
INCLUDE= $(shell pkg-config --cflags glib-2.0 libxml-2.0 gtk4)
|
||||
INCLUDE= $(shell pkg-config --cflags glib-2.0 libxml-2.0 gtk4) -I libide/core
|
||||
LIBS= $(shell pkg-config --libs glib-2.0 libxml-2.0 gtk4) -lGL -lGLU -lm -lepoxy -lX11 -lGLEW
|
||||
|
||||
BINDIR=bin
|
||||
BUILDDIR=build
|
||||
SRCDIR=src
|
||||
LIBIDEDIR=libide
|
||||
#vpath %.c $(SRCDIR)
|
||||
|
||||
SOURCES=$(shell find $(SRCDIR) -type f -name "*.c")
|
||||
LIBIDESOURCES=$(shell find $(LIBIDEDIR) -type f -name "*.c")
|
||||
LIBIDESOURCES=$(LIBIDESOURCES) $(shell find $(LIBIDEDIR) -type f -name "*.in")
|
||||
BUILDBINS=$(patsubst %.c,$(BUILDDIR)/%.o,$(SOURCES))
|
||||
BUILDDEPS=$(patsubst %.c,$(BUILDDIR)/%.d,$(SOURCES))
|
||||
LIBIDEBUILDBINS=$(patsubst %.c,$(LIBIDEDIR)/%.o,$(SOURCES))
|
||||
LIBIDEBUILDDEPS=$(patsubst %.c,$(LIBIDEDIR)/%.d,$(SOURCES))
|
||||
|
||||
|
||||
-include /etc/os-release
|
||||
|
||||
|
@ -64,6 +70,10 @@ $(BUILDDIR):
|
|||
@mkdir -p $@
|
||||
@echo -e ${CL2}[$@] ${CL}folder generated.${CL3}
|
||||
|
||||
$(LIBIDEDIR):
|
||||
@mkdir -p $@
|
||||
@echo -e ${CL2}[$@] ${CL}folder generated.${CL3}
|
||||
|
||||
$(BINDIR):
|
||||
@mkdir -p $@
|
||||
@echo -e ${CL2}[$@] ${CL}folder generated.${CL3}
|
||||
|
@ -71,17 +81,25 @@ $(BINDIR):
|
|||
#
|
||||
# Dependencies
|
||||
#
|
||||
|
||||
-include $(LIBIDEBUILDDEPS)
|
||||
|
||||
-include $(BUILDDEPS)
|
||||
|
||||
$(BUILDDIR)/%.d: %.c | $(BUILDDIR)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(CC) -MM -MT $(@:%.d=%.o) -MF $@ $<
|
||||
@$(CC) $(INCLUDE) -MM -MT $(@:%.d=%.o) -MF $@ $<
|
||||
@echo -e ${CL2}[$@] ${CL}dependencies generated.${CL3}
|
||||
|
||||
$(LIBIDEDIR)/%.d: %.c | $(LIBIDEDIR)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(CC) $(INCLUDE) -MM -MT $(@:%.d=%.o) -MF $@ $<
|
||||
@echo -e ${CL2}[$@] ${CL}dependencies generated.${CL3}
|
||||
|
||||
#
|
||||
# Compilation
|
||||
#
|
||||
$(BINDIR)/gem-graph-client: $(BUILDBINS) | $(BINDIR)
|
||||
$(BINDIR)/gem-graph-client: $(LIBIDEBUILDBINS) $(BUILDBINS) | $(BINDIR)
|
||||
@$(CC) -o $@ $(WARNINGS) $(DEBUG) $(OPTIMIZE) $^ $(INCLUDE) $(LIBS)
|
||||
@echo -e ${CL2}[$@] ${CL}built.${CL3}
|
||||
|
||||
|
@ -91,6 +109,10 @@ $(BUILDDIR)/%.o: %.c | $(BUILDDIR)
|
|||
@$(CC) $(WARNINGS) $(DEBUG) $(OPTIMIZE) $(INCLUDE) -c $< -o $@
|
||||
@echo -e ${CL2}[$@] ${CL}compiled.${CL3}
|
||||
|
||||
$(LIBIDEDIR)/%.o: %.c | $(LIBIDEDIR)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(CC) $(WARNINGS) $(DEBUG) $(OPTIMIZE) $(INCLUDE) -c $< -o $@
|
||||
@echo -e ${CL2}[$@] ${CL}compiled.${CL3}
|
||||
|
||||
#
|
||||
# Virtual recipes
|
||||
|
|
|
@ -104,7 +104,7 @@ G_BEGIN_DECLS
|
|||
*/
|
||||
|
||||
#ifndef IDE_ENABLE_TRACE
|
||||
# define IDE_ENABLE_TRACE @ENABLE_TRACING@
|
||||
# define IDE_ENABLE_TRACE 0
|
||||
#endif
|
||||
#if IDE_ENABLE_TRACE != 1
|
||||
# undef IDE_ENABLE_TRACE
|
|
@ -244,3 +244,4 @@
|
|||
#else
|
||||
# define IDE_AVAILABLE_IN_42 _IDE_EXTERN
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* The build type of the installed build.
|
||||
*/
|
||||
#define IDE_BUILD_TYPE @BUILD_TYPE@
|
||||
#define IDE_BUILD_TYPE Gem-graph
|
||||
|
||||
/**
|
||||
* IDE_BUILD_CHANNEL:
|
||||
|
@ -45,28 +45,28 @@
|
|||
* The release channel of Builder. This should be a string such as
|
||||
* "other", "flatpak-stable", or "flatpak-nightly".
|
||||
*/
|
||||
#define IDE_BUILD_CHANNEL @BUILD_CHANNEL@
|
||||
#define IDE_BUILD_CHANNEL other
|
||||
|
||||
/**
|
||||
* IDE_MAJOR_VERSION:
|
||||
*
|
||||
* libide major version component (e.g. 1 if %IDE_VERSION is 1.2.3)
|
||||
*/
|
||||
#define IDE_MAJOR_VERSION (@MAJOR_VERSION@)
|
||||
#define IDE_MAJOR_VERSION (42)
|
||||
|
||||
/**
|
||||
* IDE_MINOR_VERSION:
|
||||
*
|
||||
* libide minor version component (e.g. 2 if %IDE_VERSION is 1.2.3)
|
||||
*/
|
||||
#define IDE_MINOR_VERSION (@MINOR_VERSION@)
|
||||
#define IDE_MINOR_VERSION (1)
|
||||
|
||||
/**
|
||||
* IDE_VERSION
|
||||
*
|
||||
* libide version.
|
||||
*/
|
||||
#define IDE_VERSION (@VERSION@)
|
||||
#define IDE_VERSION (42.1)
|
||||
|
||||
/**
|
||||
* IDE_VERSION_S:
|
||||
|
@ -74,7 +74,7 @@
|
|||
* libide version, encoded as a string, useful for printing and
|
||||
* concatenation.
|
||||
*/
|
||||
#define IDE_VERSION_S "@VERSION@"
|
||||
#define IDE_VERSION_S "42.1"
|
||||
|
||||
#define IDE_ENCODE_VERSION(major,minor,micro) \
|
||||
((major) << 24 | (minor) << 16 | (micro) << 8)
|
|
@ -1,129 +0,0 @@
|
|||
libide_core_header_dir = join_paths(libide_header_dir, 'core')
|
||||
libide_core_header_subdir = join_paths(libide_header_subdir, 'core')
|
||||
libide_include_directories += include_directories('.')
|
||||
|
||||
#
|
||||
# Versioning that all libide libraries (re)use
|
||||
#
|
||||
|
||||
version_data = configuration_data()
|
||||
version_data.set('MAJOR_VERSION', MAJOR_VERSION)
|
||||
version_data.set('MINOR_VERSION', MINOR_VERSION)
|
||||
version_data.set('VERSION', meson.project_version())
|
||||
version_data.set_quoted('BUILD_CHANNEL', get_option('channel'))
|
||||
version_data.set_quoted('BUILD_TYPE', get_option('buildtype'))
|
||||
|
||||
libide_core_version_h = configure_file(
|
||||
input: 'ide-version.h.in',
|
||||
output: 'ide-version.h',
|
||||
install_dir: libide_core_header_dir,
|
||||
install: true,
|
||||
configuration: version_data)
|
||||
|
||||
libide_core_generated_headers = [libide_core_version_h]
|
||||
|
||||
libide_build_ident_h = vcs_tag(
|
||||
command: ['git', 'describe'],
|
||||
fallback: meson.project_version(),
|
||||
input: 'ide-build-ident.h.in',
|
||||
output: 'ide-build-ident.h',
|
||||
)
|
||||
libide_core_generated_headers += [libide_build_ident_h]
|
||||
|
||||
#
|
||||
# Debugging and Tracing Support
|
||||
#
|
||||
|
||||
libide_core_conf = configuration_data()
|
||||
libide_core_conf.set10('ENABLE_TRACING', get_option('tracing'))
|
||||
libide_core_conf.set('BUGREPORT_URL', 'https://gitlab.gnome.org/GNOME/gnome-builder/issues')
|
||||
|
||||
libide_debug_h = configure_file(
|
||||
input: 'ide-debug.h.in',
|
||||
output: 'ide-debug.h',
|
||||
configuration: libide_core_conf,
|
||||
install: true,
|
||||
install_dir: libide_core_header_dir,
|
||||
)
|
||||
|
||||
libide_core_generated_headers += [libide_debug_h]
|
||||
|
||||
#
|
||||
# Public API Headers
|
||||
#
|
||||
|
||||
libide_core_public_headers = [
|
||||
'ide-context.h',
|
||||
'ide-context-addin.h',
|
||||
'ide-global.h',
|
||||
'ide-log.h',
|
||||
'ide-macros.h',
|
||||
'ide-notification.h',
|
||||
'ide-notifications.h',
|
||||
'ide-object.h',
|
||||
'ide-object-box.h',
|
||||
'ide-settings.h',
|
||||
'ide-transfer.h',
|
||||
'ide-transfer-manager.h',
|
||||
'ide-version-macros.h',
|
||||
'libide-core.h',
|
||||
]
|
||||
|
||||
libide_core_private_headers = [
|
||||
'ide-transfer-manager-private.h',
|
||||
]
|
||||
|
||||
install_headers(libide_core_public_headers, subdir: libide_core_header_subdir)
|
||||
|
||||
#
|
||||
# Sources
|
||||
#
|
||||
|
||||
libide_core_public_sources = [
|
||||
'ide-context.c',
|
||||
'ide-context-addin.c',
|
||||
'ide-global.c',
|
||||
'ide-log.c',
|
||||
'ide-notification.c',
|
||||
'ide-notifications.c',
|
||||
'ide-object.c',
|
||||
'ide-object-box.c',
|
||||
'ide-object-notify.c',
|
||||
'ide-settings.c',
|
||||
'ide-transfer.c',
|
||||
'ide-transfer-manager.c',
|
||||
]
|
||||
|
||||
libide_core_sources = []
|
||||
libide_core_sources += libide_core_generated_headers
|
||||
libide_core_sources += libide_core_public_sources
|
||||
|
||||
#
|
||||
# Library Definitions
|
||||
#
|
||||
|
||||
libide_core_deps = [
|
||||
libgio_dep,
|
||||
libgtk_dep,
|
||||
libdazzle_dep,
|
||||
libpeas_dep,
|
||||
]
|
||||
|
||||
libide_core = static_library('ide-core-' + libide_api_version, libide_core_sources,
|
||||
dependencies: libide_core_deps,
|
||||
c_args: libide_args + release_args + ['-DIDE_CORE_COMPILATION'],
|
||||
)
|
||||
|
||||
libide_core_dep = declare_dependency(
|
||||
sources: libide_core_private_headers + libide_core_generated_headers,
|
||||
dependencies: libide_core_deps,
|
||||
link_with: libide_core,
|
||||
include_directories: include_directories('.'),
|
||||
)
|
||||
|
||||
gnome_builder_public_sources += files(libide_core_public_sources)
|
||||
gnome_builder_public_headers += files(libide_core_public_headers)
|
||||
gnome_builder_private_headers += files(libide_core_private_headers)
|
||||
gnome_builder_generated_headers += libide_core_generated_headers
|
||||
gnome_builder_include_subdirs += libide_core_header_subdir
|
||||
gnome_builder_gir_extra_args += ['--c-include=libide-core.h', '-DIDE_CORE_COMPILATION']
|
|
@ -0,0 +1,2 @@
|
|||
libide/src/graphics/arrows.o: src/graphics/arrows.c \
|
||||
src/graphics/../../include/base.h src/graphics/../../include/graphics.h
|
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
libide/src/graphics/graphics.o: src/graphics/graphics.c \
|
||||
src/graphics/../../include/base.h src/graphics/../../include/ui.h \
|
||||
src/graphics/../../include/graphics.h \
|
||||
src/graphics/../../include/arrows.h src/graphics/../../include/grid.h
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
libide/src/graphics/grid.o: src/graphics/grid.c \
|
||||
src/graphics/../../include/base.h src/graphics/../../include/graphics.h
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libide/src/main.o: src/main.c src/../include/base.h src/../include/ui.h
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libide/src/parsing/parsing.o: src/parsing/parsing.c
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
libide/src/ui/application.o: src/ui/application.c \
|
||||
src/ui/../../include/base.h src/ui/../../include/ui.h
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
libide/src/ui/events.o: src/ui/events.c src/ui/../../include/base.h \
|
||||
src/ui/../../include/graphics.h src/ui/../../include/ui.h
|
Binary file not shown.
|
@ -0,0 +1,25 @@
|
|||
libide/src/ui/tree.o: src/ui/tree.c \
|
||||
/gnu/store/w45prki9fmydxyx6sixnkcbrpfz56a1g-glib-2.72.3/include/glib-2.0/glib.h \
|
||||
src/ui/../../include/base.h src/ui/../../include/ui.h \
|
||||
src/ui/../../libide/tree/libide-tree.h \
|
||||
/gnu/store/xzgdf1mww3yjgdbd24bz98fdf9i8pqq0-gtk-4.8.1/include/gtk-4.0/gtk/gtk.h \
|
||||
src/ui/../../libide/tree/ide-tree.h \
|
||||
src/ui/../../libide/tree/../core/libide-core.h \
|
||||
src/ui/../../libide/tree/../core/ide-context.h \
|
||||
src/ui/../../libide/tree/../core/ide-object.h \
|
||||
src/ui/../../libide/tree/../core/ide-version-macros.h \
|
||||
src/ui/../../libide/tree/../core/ide-version.h \
|
||||
src/ui/../../libide/tree/../core/ide-context-addin.h \
|
||||
src/ui/../../libide/tree/../core/ide-debug.h \
|
||||
src/ui/../../libide/tree/../core/ide-global.h \
|
||||
src/ui/../../libide/tree/../core/ide-log.h \
|
||||
src/ui/../../libide/tree/../core/ide-macros.h \
|
||||
src/ui/../../libide/tree/../core/ide-notification.h \
|
||||
src/ui/../../libide/tree/../core/ide-notifications.h \
|
||||
src/ui/../../libide/tree/../core/ide-object-box.h \
|
||||
src/ui/../../libide/tree/../core/ide-settings.h \
|
||||
src/ui/../../libide/tree/../core/ide-transfer.h \
|
||||
src/ui/../../libide/tree/../core/ide-transfer-manager.h \
|
||||
src/ui/../../libide/tree/ide-tree-node.h \
|
||||
src/ui/../../libide/tree/ide-tree-addin.h \
|
||||
src/ui/../../libide/tree/ide-tree-model.h
|
|
@ -0,0 +1,2 @@
|
|||
libide/src/ui/window.o: src/ui/window.c src/ui/../../include/base.h \
|
||||
src/ui/../../include/ui.h
|
Binary file not shown.
|
@ -21,7 +21,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include </home/jean/Gem-Graph/gem-graph-client/libide/core/libide-core.h>
|
||||
#include "../core/libide-core.h"
|
||||
|
||||
#include "ide-tree-node.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "../../include/base.h"
|
||||
#include "../../include/ui.h"
|
||||
//#include "/home/jean/Gem-Graph/gem-graph-client/libide/tree/libide-tree.h"
|
||||
#include "../../libide/tree/libide-tree.h"
|
||||
|
||||
void Hello(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue