summaryrefslogtreecommitdiff
blob: 92b458d439df8d269f3b0a619dbcc7c2e52b2115 (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
62
63
64
65
--- Linux/Cli/Makefile.orig	2006-06-27 06:18:32.000000000 +1000
+++ Linux/Cli/Makefile	2006-07-11 21:24:07.000000000 +1000
@@ -9,22 +9,13 @@
 -include ../Common/.platform
 endif
 
-ifdef NO_WARNINGS
-CFLAGS := -w
-else
-CFLAGS := -W
-endif
 CFLAGS += -I../../Crypto -I../../Common -I../Kernel
 CFLAGS += -D_cdecl="" -DBOOL=int -DTRUE=1 -DFALSE=0 -DMAX_PATH=260
 CFLAGS += $(TYPES)
 
-ifndef DEBUG
 # Do not enable strict aliasing
-CFLAGS += -O2 -fno-strict-aliasing
-else
-CFLAGS += -ggdb
+CFLAGS += -fno-strict-aliasing
 NO_STRIP := 1
-endif
 
 KERNEL_OBJS_F := ../.kernel-objs
 USER_OBJS_F := ../.user-objs
@@ -60,11 +51,11 @@
 OBJS += $(TC_COMMON)/Tests.o
 OBJS += Cli.o 
 
-%.o: %.c
+%.o: %.c $(USER_OBJS_F)
 	@echo Compiling $(<F)
-	@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -o $@ -c $<
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -o $@ -c $<
 
-all: objclean truecrypt
+all: $(USER_OBJS_F) truecrypt
 	@echo Done.
 
 ../Common/.platform: ../Common/Platform.c
@@ -75,7 +66,7 @@
 
 truecrypt: $(OBJS)
 	@echo Linking $@
-	@$(CC) -o $@ $(OBJS)
+	$(CC) -o $@ $(OBJS)
 ifndef NO_STRIP
 	@strip $@
 endif
@@ -85,9 +76,11 @@
 truecrypt.1: objclean truecrypt
 	help2man -N -i Man/help2man.inc ./truecrypt >Man/truecrypt.1
 	
-objclean:
-	@if [ -f $(KERNEL_OBJS_F) ]; then rm -f ${OBJS} $(KERNEL_OBJS_F); fi
+$(USER_OBJS_F):
+	@if [ -f $(KERNEL_OBJS_F) ]; then rm -f $(OBJS) $(KERNEL_OBJS_F); fi
 	@>$(USER_OBJS_F)
 
 clean:
-	-rm -f truecrypt ${OBJS} *.d $(TC_COMMON)/*.d $(TC_CRYPTO)/*.d ../Common/platform ../Common/.platform
+	-rm -f truecrypt $(OBJS) *.d $(TC_COMMON)/*.d $(TC_CRYPTO)/*.d ../Common/platform ../Common/.platform
+
+.PHONY: man clean all