hot warm cold (creation)
This commit is contained in:
parent
f10b52e7dd
commit
235d907e55
48
Makefile
48
Makefile
|
@ -15,22 +15,64 @@ OPTIMIZE = -O2
|
||||||
all:
|
all:
|
||||||
exec
|
exec
|
||||||
|
|
||||||
exec.o:
|
exec.o: hot.c warm.c cold.c main.c Makefile
|
||||||
$(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) warm.c -o $@ main.c
|
$(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) hot.c warm.c cold.c -o $@ main.c
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f exec.o
|
rm -f exec.o
|
||||||
|
|
||||||
|
# Builder will call this to install the application before running.
|
||||||
install:
|
install:
|
||||||
echo "Installing is not supported"
|
echo "Installing is not supported"
|
||||||
|
|
||||||
run:
|
# Builder uses this target to run your application.
|
||||||
|
run: exec.o
|
||||||
./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 )
|
# gcc $( pkg-config --cflags gtk4 ) -o exec main.c $( pkg-config --libs gtk4 )
|
||||||
|
|
||||||
# https://www.gnu.org/software/make/manual/
|
# https://www.gnu.org/software/make/manual/
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <gtk-4.0/gtk/gtk.h>
|
||||||
|
|
||||||
|
void print_text(GtkWidget *widget, gpointer data) {g_print (data);}
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
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"));
|
||||||
|
|
2
main.c
2
main.c
|
@ -1,5 +1,7 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include "hot.h"
|
||||||
#include "warm.h"
|
#include "warm.h"
|
||||||
|
#include "cold.h"
|
||||||
|
|
||||||
static void activate (GtkApplication *app, gpointer user_data) {
|
static void activate (GtkApplication *app, gpointer user_data) {
|
||||||
GtkWidget *button_0 = gtk_button_new_with_label ("Quit");
|
GtkWidget *button_0 = gtk_button_new_with_label ("Quit");
|
||||||
|
|
2
warm.c
2
warm.c
|
@ -12,4 +12,4 @@
|
||||||
|
|
||||||
// GtkToggleButton *tb1 = GTK_TOGGLE_BUTTON (gtk_button_new_with_label ("tb1"));
|
// GtkToggleButton *tb1 = GTK_TOGGLE_BUTTON (gtk_button_new_with_label ("tb1"));
|
||||||
|
|
||||||
void print_text(GtkWidget *widget, gpointer data) {g_print (data);}
|
|
||||||
|
|
3
warm.h
3
warm.h
|
@ -13,6 +13,7 @@
|
||||||
#include <glib-2.0/glib.h>
|
#include <glib-2.0/glib.h>
|
||||||
#include <gtk-4.0/gtk/gtk.h>
|
#include <gtk-4.0/gtk/gtk.h>
|
||||||
|
|
||||||
|
/*
|
||||||
extern GtkWidget *button_0;
|
extern GtkWidget *button_0;
|
||||||
extern GtkWidget *button_1;
|
extern GtkWidget *button_1;
|
||||||
extern GtkWidget *button_2;
|
extern GtkWidget *button_2;
|
||||||
|
@ -21,4 +22,4 @@ extern GtkWidget *button_4;
|
||||||
extern GtkWidget *button_5;
|
extern GtkWidget *button_5;
|
||||||
|
|
||||||
void print_text(char *text);
|
void print_text(char *text);
|
||||||
|
*/
|
||||||
|
|
Loading…
Reference in New Issue