diff --git a/Makefile b/Makefile index 35a3fe1..7e718ca 100644 --- a/Makefile +++ b/Makefile @@ -15,22 +15,64 @@ OPTIMIZE = -O2 all: exec -exec.o: - $(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) warm.c -o $@ main.c +exec.o: hot.c warm.c cold.c main.c Makefile + $(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) hot.c warm.c cold.c -o $@ main.c clean: rm -f exec.o +# Builder will call this to install the application before running. install: echo "Installing is not supported" -run: +# Builder uses this target to run your application. +run: exec.o ./exec.o + + + + +#------------------------------------------------------------------------------# +# To study : can the following commands be removed ? # +#------------------------------------------------------------------------------# + +#SHELL = /bin/sh +#.SUFFIXES: +#.SUFFIXES: .c .o .h # is .h useful ? +#.PHONY = run +#.PHONY = clean +#.PHONY: Makefile + +#CC=gcc +#CFLAGS=`pkg-config --cflags gtk4 --libs gtk4` +#WARNINGS = -Wall +#DEBUG = -ggdb -fno-omit-frame-pointer +#OPTIMIZE = -O2 + +# in exec.o: +# $(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) +# après les $(...), dans : warm.c -o $@ main.c le $@ peut être supprimé +#all: +# exec + +#install: +# echo "Installing is not supported" + + + + + + +#------------------------------------------------------------------------------# +# Personnal notes & links # +#------------------------------------------------------------------------------# + + # gcc $( pkg-config --cflags gtk4 ) -o exec main.c $( pkg-config --libs gtk4 ) # https://www.gnu.org/software/make/manual/ diff --git a/cold.c b/cold.c new file mode 100644 index 0000000..79e887e --- /dev/null +++ b/cold.c @@ -0,0 +1,4 @@ +#include +#include + +void print_text(GtkWidget *widget, gpointer data) {g_print (data);} diff --git a/cold.h b/cold.h new file mode 100644 index 0000000..bae6424 --- /dev/null +++ b/cold.h @@ -0,0 +1,14 @@ +#include +#include + +void print_text(GtkWidget *widget, gpointer data); +/* + GtkWidget *button_0 = gtk_button_new_with_label ("Quit"); + GtkWidget *button_1 = gtk_button_new_with_label ("I"); + GtkWidget *button_2 = gtk_button_new_with_label ("II"); + GtkWidget *button_3 = gtk_button_new_with_label ("III"); + GtkWidget *button_4 = gtk_button_new_with_label ("IV"); + GtkWidget *button_5 = gtk_button_new_with_label ("V"); +*/ +// GtkToggleButton *tb1 = GTK_TOGGLE_BUTTON (gtk_button_new_with_label ("tb1")); + diff --git a/exec.o b/exec.o index b9b918b..9a622b7 100755 Binary files a/exec.o and b/exec.o differ diff --git a/hot.c b/hot.c new file mode 100644 index 0000000..b7f0285 --- /dev/null +++ b/hot.c @@ -0,0 +1,4 @@ +#include +#include + + diff --git a/hot.h b/hot.h new file mode 100644 index 0000000..ee69459 --- /dev/null +++ b/hot.h @@ -0,0 +1,3 @@ +#include +#include + diff --git a/main.c b/main.c index b05e542..cf5c551 100755 --- a/main.c +++ b/main.c @@ -1,5 +1,7 @@ #include +#include "hot.h" #include "warm.h" +#include "cold.h" static void activate (GtkApplication *app, gpointer user_data) { GtkWidget *button_0 = gtk_button_new_with_label ("Quit"); diff --git a/warm.c b/warm.c index 0f22fe4..4debdbb 100644 --- a/warm.c +++ b/warm.c @@ -12,4 +12,4 @@ // GtkToggleButton *tb1 = GTK_TOGGLE_BUTTON (gtk_button_new_with_label ("tb1")); -void print_text(GtkWidget *widget, gpointer data) {g_print (data);} + diff --git a/warm.h b/warm.h index 2a944d3..6a820f8 100644 --- a/warm.h +++ b/warm.h @@ -13,6 +13,7 @@ #include #include +/* extern GtkWidget *button_0; extern GtkWidget *button_1; extern GtkWidget *button_2; @@ -21,4 +22,4 @@ extern GtkWidget *button_4; extern GtkWidget *button_5; void print_text(char *text); - +*/