-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile2
69 lines (46 loc) · 1.85 KB
/
Makefile2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Essai ajout ligne
# Essai ajout ligne 2
# Licence LGPL / Author Eric Bachard nov 2012
# Makefile qui permet de créer les binaires
# essai et dbg_essai
# definition des macro-constantes
EXEC_NAME = cashut
CC = gcc
CFLAGS = `pkg-config --cflags gtk+-3.0` -Wall -ansi
LIBS=`pkg-config --libs gtk+-3.0` `mysql_config --cflags --libs` -std=c99
CFLAGS_DEBUG = -g
SOURCES_DIR = sources
OUTBIN = $(EXEC_NAME)
OUTBIN_DEBUG = dbg_$(EXEC_NAME)
BIN_DIR = build
OBJS=main.o main_callbacks.o main_mysql.o cashut_main.o cashut_main_callbacks.o main_gestion_liste.o
FILES = *.c
INCLUDES_DIR = resources
GLADE_DIR = glade
RESOURCES=window_connexion.inc window_cashut.inc
cashut: $(RESOURCES) $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
%.inc: $(GLADE_DIR)/%.glade
@echo Converting $< to $(BIN_DIR)/$@
@echo /\* autogenerated file, do not modify! \*/> $(BIN_DIR)/$@
@echo /\* source file: $< \*/>> $(BIN_DIR)/$@
@echo const gchar \* $(subst .,_,$(<F))=>> $(BIN_DIR)/$@
@sed -e 's/"/\\"/g' -e 's/.*/"&"/' $< >> $(BIN_DIR)/$@
@echo \;>> $(BIN_DIR)/$@
main.o: main.c window_connexion.inc main_callbacks.h main_mysql.h structures.h
#cd $(SOURCES_DIR)
$(CC) $(CFLAGS) -c $< $(LIBS)
main_callbacks.o: main_callbacks.c main_callbacks.h main_mysql.h cashut_main.h
$(CC) $(CFLAGS) -c $< $(LIBS)
main_mysql.o: main_mysql.c main_mysql.h main_callbacks.h
$(CC) $(CFLAGS) -c $< $(LIBS)
cashut_main.o: cashut_main.c cashut_main.h cashut_main_callbacks.h main_mysql.h main_gestion_liste.h structures.h
$(CC) $(CFLAGS) -c $< $(LIBS)
cashut_main_callbacks.o: cashut_main_callbacks.c cashut_main_callbacks.h
$(CC) $(CFLAGS) -c $< $(LIBS)
main_gestion_liste.o: main_gestion_liste.c main_gestion_liste.h structures.h main_mysql.h
$(CC) $(CFLAGS) -c $< $(LIBS)
clean:
${RM} *.o *.inc cashut
#$(OUTBIN) : $(SOURCES_DIR)/$(FILES)
# $(CC) $(CFLAGS) -I$(INCLUDES_DIR) $(DEPS) -o $(OUTBIN) $(LIBS)