summaryrefslogtreecommitdiff
path: root/misc/langdrill/050_cflags.diff
blob: 52dccb8c484a6e08e6a13264c46ccb56044926e4 (plain)
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
diff -ur langdrill-0.3/src/Makefile langdrill-0.3/src/Makefile
--- langdrill-0.3/src/Makefile	2018-03-19 10:15:09.855912688 -0700
+++ langdrill-0.3/src/Makefile	2018-03-19 10:13:38.535093214 -0700
@@ -16,7 +16,9 @@
 DEF_FLAGS = -DTARGET='"$(TARGET)"' \
 	-DDRILL_DEF='"$(DRILL_DEF)"' \
 	-DDRILL_DIR='"$(DRILL_DIR)"' \
-	`pkg-config --cflags gtk+-2.0`
+	`pkg-config --cflags gtk+-2.0` \
+	`vdk-config-2 --cflags` \
+	-Wall
 
 ###### Test for Debian GNU/Linux
 # If your system is not Debian GNU/Linux please modify the values after
@@ -27,16 +29,15 @@
 	DRILL_DIR=$(DESTDIR)/usr/share/langdrill
 	BIN_DIR=$(DESTDIR)/usr/bin
 	MAN_DIR=$(DESTDIR)/usr/share/man/man1
-	CFLAGS = -Wall `vdk-config-2 --cflags` $(DEF_FLAGS)
 else
 	MY_MESSAGE_OF_THE_DAY=">>" $(TARGET) compilled for NON-Debian GNU/Linux system. "<<"
 	DRILL_DIR=$(DESTDIR)/usr/local/share/langdrill
 	BIN_DIR=$(DESTDIR)/usr/local/bin
 	MAN_DIR=$(DESTDIR)/usr/local/man/man1
-	CFLAGS = -Wall -g `vdk-config-2 --cflags` $(DEF_FLAGS)
 endif
 
 CC = g++
+CFLAGS = -g
 LFLAGS = -Wl,--as-needed `vdk-config-2 --libs` `pkg-config --libs gtk+-2.0`
 
 
@@ -45,7 +46,7 @@
 .SUFFIXES: .cc
 
 .cc.o: $(SRC)
-	$(CC) $(CFLAGS) -c $*.cc -o $@
+	$(CC) $(CFLAGS) $(DEF_FLAGS) -c $*.cc -o $@
 
 ####### Build rules
 
@@ -62,16 +63,16 @@
 
 $(TARGET): tarclean $(OBJ)
 	@echo $(MY_MESSAGE_OF_THE_DAY)
-	$(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
+	$(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
 
 run:	tarclean $(OBJ)
 	@echo $(MY_MESSAGE_OF_THE_DAY)
-	$(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
+	$(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
 	./$(TARGET)
 
 build: clean tarclean $(OBJ)
 	@echo $(MY_MESSAGE_OF_THE_DAY)
-	$(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
+	$(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
 
 install: all
 	install -d $(BIN_DIR) $(DRILL_DIR) $(MAN_DIR)