diff --git a/Makefile b/Makefile index 5e9c7d6..47cd6b1 100644 --- a/Makefile +++ b/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") +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 diff --git a/libide/core/ide-debug.h.in b/libide/core/ide-debug.h similarity index 99% rename from libide/core/ide-debug.h.in rename to libide/core/ide-debug.h index 7d6167b..1d3146f 100644 --- a/libide/core/ide-debug.h.in +++ b/libide/core/ide-debug.h @@ -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 diff --git a/libide/core/ide-version-macros.h b/libide/core/ide-version-macros.h index b8487e8..b0dd86c 100644 --- a/libide/core/ide-version-macros.h +++ b/libide/core/ide-version-macros.h @@ -244,3 +244,4 @@ #else # define IDE_AVAILABLE_IN_42 _IDE_EXTERN #endif + diff --git a/libide/core/ide-version.h.in b/libide/core/ide-version.h similarity index 91% rename from libide/core/ide-version.h.in rename to libide/core/ide-version.h index 2383079..dc2e9bc 100644 --- a/libide/core/ide-version.h.in +++ b/libide/core/ide-version.h @@ -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) diff --git a/libide/core/meson.build b/libide/core/meson.build deleted file mode 100644 index 4829942..0000000 --- a/libide/core/meson.build +++ /dev/null @@ -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'] diff --git a/libide/src/graphics/arrows.d b/libide/src/graphics/arrows.d new file mode 100644 index 0000000..1355bd6 --- /dev/null +++ b/libide/src/graphics/arrows.d @@ -0,0 +1,2 @@ +libide/src/graphics/arrows.o: src/graphics/arrows.c \ + src/graphics/../../include/base.h src/graphics/../../include/graphics.h diff --git a/libide/src/graphics/arrows.o b/libide/src/graphics/arrows.o new file mode 100644 index 0000000..75a3650 Binary files /dev/null and b/libide/src/graphics/arrows.o differ diff --git a/libide/src/graphics/graphics.d b/libide/src/graphics/graphics.d new file mode 100644 index 0000000..e630960 --- /dev/null +++ b/libide/src/graphics/graphics.d @@ -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 diff --git a/libide/src/graphics/graphics.o b/libide/src/graphics/graphics.o new file mode 100644 index 0000000..134676c Binary files /dev/null and b/libide/src/graphics/graphics.o differ diff --git a/libide/src/graphics/grid.d b/libide/src/graphics/grid.d new file mode 100644 index 0000000..8c12ebf --- /dev/null +++ b/libide/src/graphics/grid.d @@ -0,0 +1,2 @@ +libide/src/graphics/grid.o: src/graphics/grid.c \ + src/graphics/../../include/base.h src/graphics/../../include/graphics.h diff --git a/libide/src/graphics/grid.o b/libide/src/graphics/grid.o new file mode 100644 index 0000000..bff1ed9 Binary files /dev/null and b/libide/src/graphics/grid.o differ diff --git a/libide/src/main.d b/libide/src/main.d new file mode 100644 index 0000000..580a14f --- /dev/null +++ b/libide/src/main.d @@ -0,0 +1 @@ +libide/src/main.o: src/main.c src/../include/base.h src/../include/ui.h diff --git a/libide/src/main.o b/libide/src/main.o new file mode 100644 index 0000000..78a1dbd Binary files /dev/null and b/libide/src/main.o differ diff --git a/libide/src/parsing/parsing.d b/libide/src/parsing/parsing.d new file mode 100644 index 0000000..f983946 --- /dev/null +++ b/libide/src/parsing/parsing.d @@ -0,0 +1 @@ +libide/src/parsing/parsing.o: src/parsing/parsing.c diff --git a/libide/src/parsing/parsing.o b/libide/src/parsing/parsing.o new file mode 100644 index 0000000..781a654 Binary files /dev/null and b/libide/src/parsing/parsing.o differ diff --git a/libide/src/ui/application.d b/libide/src/ui/application.d new file mode 100644 index 0000000..5a44a73 --- /dev/null +++ b/libide/src/ui/application.d @@ -0,0 +1,2 @@ +libide/src/ui/application.o: src/ui/application.c \ + src/ui/../../include/base.h src/ui/../../include/ui.h diff --git a/libide/src/ui/application.o b/libide/src/ui/application.o new file mode 100644 index 0000000..627ec49 Binary files /dev/null and b/libide/src/ui/application.o differ diff --git a/libide/src/ui/events.d b/libide/src/ui/events.d new file mode 100644 index 0000000..b95cdd2 --- /dev/null +++ b/libide/src/ui/events.d @@ -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 diff --git a/libide/src/ui/events.o b/libide/src/ui/events.o new file mode 100644 index 0000000..66b3daa Binary files /dev/null and b/libide/src/ui/events.o differ diff --git a/libide/src/ui/tree.d b/libide/src/ui/tree.d new file mode 100644 index 0000000..bd13082 --- /dev/null +++ b/libide/src/ui/tree.d @@ -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 diff --git a/libide/src/ui/window.d b/libide/src/ui/window.d new file mode 100644 index 0000000..9a3ef8b --- /dev/null +++ b/libide/src/ui/window.d @@ -0,0 +1,2 @@ +libide/src/ui/window.o: src/ui/window.c src/ui/../../include/base.h \ + src/ui/../../include/ui.h diff --git a/libide/src/ui/window.o b/libide/src/ui/window.o new file mode 100644 index 0000000..bfaccde Binary files /dev/null and b/libide/src/ui/window.o differ diff --git a/libide/tree/ide-tree.h b/libide/tree/ide-tree.h index c829df3..44584dd 100644 --- a/libide/tree/ide-tree.h +++ b/libide/tree/ide-tree.h @@ -21,7 +21,7 @@ #pragma once #include -#include +#include "../core/libide-core.h" #include "ide-tree-node.h" diff --git a/src/ui/tree.c b/src/ui/tree.c index 8a387a1..79947b2 100644 --- a/src/ui/tree.c +++ b/src/ui/tree.c @@ -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) {