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