summaryrefslogtreecommitdiff
blob: b853fc7b65ad1e273600d7b91bbba2a8d7434773 (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
66
67
68
69
70
71
72
73
74
75
76
77
--- a/Makefile
+++ b/Makefile
@@ -19,10 +19,10 @@
 # You should leave -static in the CFLAGS so that your sysinfo can be
 # compiled into the executable.
 
-CC = gcc
+#CC = gcc
 
 # generic options for gcc
-CFLAGS = -s -static -Wall -O3
+#CFLAGS = -s -static -Wall -O3
 
 # if your gcc lets you do it, then try this one
 #CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
@@ -96,10 +96,10 @@
 ##########################################################################
 # For LINUX-like systems with gcc
 sysinfoc.c: Makefile
-	./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)
+	./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)
 
 sysinfo.c: Makefile
-	./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)
+	./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)
 
 ##########################################################################
 # For non-LINUX systems
@@ -107,39 +107,39 @@
 # and take sysinfo.c and sysinfoc.c out of the dependencies for nbench0.o
 
 hardware.o: hardware.c hardware.h Makefile
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-c hardware.c
 
 nbench0.o: nbench0.h nbench0.c nmglobal.h pointer.h hardware.h\
 	   Makefile sysinfo.c sysinfoc.c
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-c nbench0.c
 
 emfloat.o: emfloat.h emfloat.c nmglobal.h pointer.h Makefile
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-c emfloat.c
 
 pointer.h: pointer Makefile
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-o pointer pointer.c
 	rm -f pointer.h
 	if [ "4" = `./pointer` ] ; then touch pointer.h ;\
 	else echo "#define LONG64" >pointer.h ; fi
 
-misc.o: misc.h misc.c Makefile
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+misc.o: misc.h misc.c pointer.h Makefile
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-c misc.c
 
 nbench1.o: nbench1.h nbench1.c wordcat.h nmglobal.h pointer.h Makefile
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-c nbench1.c
 
 sysspec.o: sysspec.h sysspec.c nmglobal.h pointer.h Makefile
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS)\
 		-c sysspec.c
 
 nbench: emfloat.o misc.o nbench0.o nbench1.o sysspec.o hardware.o
-	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(LINKFLAGS)\
+	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)\
 		emfloat.o misc.o nbench0.o nbench1.o sysspec.o hardware.o\
 		-o nbench -lm