181
|
1 |
diff -ur toolame-02l-orig/Makefile toolame-02l/Makefile
|
|
2 |
--- toolame-02l-orig/Makefile 2003-03-02 14:07:02.000000000 +0700
|
|
3 |
+++ toolame-02l/Makefile 2007-03-20 10:15:03.253294168 +0700
|
|
4 |
@@ -1,5 +1,5 @@
|
|
5 |
|
|
6 |
-CC = gcc
|
|
7 |
+# CC = gcc
|
|
8 |
|
|
9 |
c_sources = \
|
|
10 |
common.c \
|
|
11 |
@@ -26,41 +26,20 @@
|
|
12 |
|
|
13 |
OBJ = $(c_sources:.c=.o)
|
|
14 |
|
|
15 |
-#Uncomment this if you want to do some profiling/debugging
|
|
16 |
-#PG = -g -pg
|
|
17 |
-PG = -fomit-frame-pointer
|
|
18 |
-
|
|
19 |
-# Optimize flag. 3 is about as high as you can sanely go with GCC3.2.
|
|
20 |
-OPTIM = -O3
|
|
21 |
+ifeq ($(CC),gcc)
|
|
22 |
+ INLINE = inline
|
|
23 |
+endif
|
|
24 |
|
|
25 |
# These flags are pretty much mandatory
|
|
26 |
-REQUIRED = -DNDEBUG -DINLINE=inline
|
|
27 |
-
|
|
28 |
-#pick your architecture
|
|
29 |
-ARCH = -march=pentium
|
|
30 |
-#Possible x86 architectures
|
|
31 |
-#gcc3.2 => i386, i486, i586, i686, pentium, pentium-mmx
|
|
32 |
-# pentiumpro, pentium2, pentium3, pentium4, k6, k6-2, k6-3,
|
|
33 |
-# athlon, athlon-tbird, athlon-4, athlon-xp and athlon-mp.
|
|
34 |
-
|
|
35 |
-#TWEAK the hell out of the compile. Some of these are real dodgy
|
|
36 |
-# and will cause program instability
|
|
37 |
-#TWEAKS = -finline-functions -fexpensive-optimizations -ffast-math \
|
|
38 |
-# -malign-double \
|
|
39 |
-# -mfancy-math-387 -funroll-loops -funroll-all-loops -pipe \
|
|
40 |
-# -fschedule-insns2 -fno-strength-reduce
|
|
41 |
-
|
|
42 |
-#Set a stack of warnings to overcome my atrocious coding style . MFC.
|
|
43 |
-WARNINGS = -Wall
|
|
44 |
-WARNINGS2 = -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wredundant-decls
|
|
45 |
+REQUIRED = -DNDEBUG -DINLINE=$(INLINE)
|
|
46 |
|
|
47 |
NEW_02L_FIXES = -DNEWENCODE -DNEWATAN
|
|
48 |
|
|
49 |
-CC_SWITCHES = $(OPTIM) $(REQUIRED) $(ARCH) $(PG) $(TWEAKS) $(WARNINGS) $(NEW_02L_FIXES)
|
|
50 |
+CC_SWITCHES = $(CFLAGS) $(REQUIRED) $(NEW_02L_FIXES)
|
|
51 |
|
|
52 |
PGM = toolame
|
|
53 |
|
|
54 |
-LIBS = -lm
|
|
55 |
+LIBS = $(LDFLAGS) -lm
|
|
56 |
|
|
57 |
#nick burch's OS/2 fix [email protected]
|
|
58 |
UNAME = $(shell uname)
|
|
59 |
@@ -75,7 +54,7 @@
|
|
60 |
$(CC) $(CC_SWITCHES) -c $< -o $@
|
|
61 |
|
|
62 |
$(PGM): $(OBJ) Makefile
|
|
63 |
- $(CC) $(PG) -o $(PGM) $(OBJ) $(LIBS)
|
|
64 |
+ $(CC) $(CC_SWITCHES) -o $(PGM) $(OBJ) $(LIBS)
|
|
65 |
|
|
66 |
clean:
|
|
67 |
-rm $(OBJ) $(DEP)
|