Réorganisation des répertoires

This commit is contained in:
Adrien Bourmault 2023-01-25 12:24:52 +01:00
parent 11c9405080
commit 1b17dcf5b1
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
11 changed files with 31 additions and 59 deletions

View File

@ -49,9 +49,9 @@ LIBS= $(shell pkg-config --libs glib-2.0 libxml-2.0 gtk4) -lGL -lGLU -lm -lepoxy
BINDIR=bin
BUILDDIR=build
SRCDIR=src
vpath %.c $(SRCDIR)
#vpath %.c $(SRCDIR)
SOURCES= $(shell ls -r $(SRCDIR))
SOURCES= $(shell find $(SRCDIR) -type f -name "*.c")
BUILDBINS=$(patsubst %.c,$(BUILDDIR)/%.o,$(SOURCES))
BUILDDEPS=$(patsubst %.c,$(BUILDDIR)/%.d,$(SOURCES))
@ -74,6 +74,7 @@ $(BINDIR):
-include $(BUILDDEPS)
$(BUILDDIR)/%.d: %.c | $(BUILDDIR)
@mkdir -p $(shell dirname $@)
@$(CC) -MM -MT $(@:%.d=%.o) -MF $@ $<
@echo -e ${CL2}[$@] ${CL}dependencies generated.${CL3}
@ -86,6 +87,7 @@ $(BINDIR)/gem-graph-client: $(BUILDBINS) | $(BINDIR)
$(BUILDDIR)/%.o: %.c | $(BUILDDIR)
@mkdir -p $(shell dirname $@)
@$(CC) $(WARNINGS) $(DEBUG) $(OPTIMIZE) $(INCLUDE) -c $< -o $@
@echo -e ${CL2}[$@] ${CL}compiled.${CL3}

View File

@ -23,8 +23,24 @@
*/
#pragma once
#include <unistd.h>
#include <gtk-4.0/gtk/gtk.h>
#include <gtk/gtk.h>
#include "../include/base.h"
extern float rotation_angles[N_AXIS];
G_BEGIN_DECLS
#define GEM_GRAPH_CLIENT_TYPE_WINDOW (gem_graph_client_window_get_type())
G_DECLARE_FINAL_TYPE (GemGraphClientWindow,
gem_graph_client_window,
GEM_GRAPH_CLIENT,
WINDOW,
GtkApplicationWindow)
G_END_DECLS
G_BEGIN_DECLS

View File

@ -1,46 +0,0 @@
/*
* Gem-graph OpenGL experiments
*
* Desc: User interface header
*
* Copyright (C) 2023 Arthur Menges <arthur.menges@a-lec.org>
* Copyright (C) 2023 Adrien Bourmault <neox@a-lec.org>
*
* This file is part of Gem-graph.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <unistd.h>
#include <gtk-4.0/gtk/gtk.h>
#include "../include/base.h"
extern float rotation_angles[N_AXIS];
G_BEGIN_DECLS
#define GEM_GRAPH_CLIENT_TYPE_WINDOW (gem_graph_client_window_get_type())
G_DECLARE_FINAL_TYPE (GemGraphClientWindow,
gem_graph_client_window,
GEM_GRAPH_CLIENT,
WINDOW,
GtkApplicationWindow)
G_END_DECLS
//void on_activate(GtkApplication *app, gpointer user_data);

View File

@ -9,6 +9,7 @@
"coreutils"
"gcc-toolchain"
"pkg-config"
"findutils"
"make"
"gtk"
"libxml2"

View File

@ -33,7 +33,7 @@
#include <math.h>
#include "../include/base.h"
#include "../include/window.h"
#include "../include/ui.h"
#define VERTEX_SHADER_FILE "data/shader.vert"
#define FRAG_SHADER_FILE "data/shader.frag"

View File

@ -26,8 +26,7 @@
#include <gtk-4.0/gtk/gtk.h>
#include "../include/base.h"
#include "../include/window.h"
#include "../include/application.h"
#include "../include/ui.h"
/* -------------------------------------------------------------------------- */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../include/application.h"
#include "../include/window.h"
#include "../../include/base.h"
#include "../../include/ui.h"
struct _GemGraphClientApplication
{

View File

@ -26,9 +26,9 @@
#include <gtk-4.0/gtk/gtk.h>
#include <glib-2.0/glib.h>
#include "../include/base.h"
#include "../include/graphics.h"
#include "../include/window.h"
#include "../../include/base.h"
#include "../../include/graphics.h"
#include "../../include/ui.h"
/* -------------------------------------------------------------------------- */
@ -219,8 +219,8 @@ static void gem_graph_client_window_class_init(GemGraphClientWindowClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
if (g_file_get_contents("ui/gemgraph.ui", &contents, &len, &err) == FALSE)
g_error("error reading ui/gemgraph.ui: %s", err->message);
if (g_file_get_contents("src/ui/gemgraph.ui", &contents, &len, &err) == FALSE)
g_error("error reading gemgraph.ui: %s", err->message);
bytes = g_bytes_new_take(contents, len);
gtk_widget_class_set_template(GTK_WIDGET_CLASS(klass), bytes);