summaryrefslogtreecommitdiff
blob: 901484db9995c94ea6db83044a72af1211aa91dd (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
diff --git a/utils/Makefile b/utils/Makefile
index 4929e08..51c4e5f 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -16,14 +16,13 @@
 
 #KERNELDIR = /usr/src/kernel-headers-2.4.18
 
-CFLAGS =   -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL
+CFLAGS+=   -I.. -Wall -DCONFIG_YAFFS_UTIL $(CPPFLAGS)
 CFLAGS+=   -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
 CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
 
 ## Change if you are using a cross-compiler
 MAKETOOLS = 
 
-CC=$(MAKETOOLS)gcc
 
 MKYAFFSOBJS = mkyaffs.o
 
@@ -36,13 +35,13 @@ $(MKYAFFSIMAGEOBJS): %.o: %.c
 	$(CC) -c $(CFLAGS) $< -o $@
 
 mkyaffsimage: $(MKYAFFSIMAGEOBJS)
-	$(CC) -o $@ $(MKYAFFSIMAGEOBJS)
+	$(CC) $(CFLAGS) -o $@ $(MKYAFFSIMAGEOBJS) $(LDFLAGS)
 
 $(MKYAFFSOBJS): %.o: %.c
 	$(CC) -c $(CFLAGS) $< -o $@
 
 mkyaffs: $(MKYAFFSOBJS)
-	$(CC) -o $@ $(MKYAFFSOBJS)
+	$(CC) $(CFLAGS) -o $@ $(MKYAFFSOBJS) $(LDFLAGS)
 
 yaffs_ecc.c:
 	ln -s ../yaffs_ecc.c yaffs_ecc.c