summaryrefslogtreecommitdiff
path: root/emulators/Cygne-SDL/patches/patch-aa
blob: 86ba2d2a61bd21c3c3aedce379d3944e716a4adc (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
$NetBSD: patch-aa,v 1.2 2004/11/02 02:22:22 dillo Exp $

--- Makefiles/Makefile.unix.orig	2002-03-26 17:50:55.000000000 +0100
+++ Makefiles/Makefile.unix
@@ -1,5 +1,4 @@
-CC = gcc
-LD = gcc 
+#LD = g++
 NASM = nasm
 
 ### Include and lib stuff ####
@@ -8,17 +7,13 @@ STDLIB     = /usr/lib 
 SDLINCLUDE = /usr/local/include/SDL
 SDLLIB	   = /usr/local/lib
 
-CFLAGS = -O1 -DUNIX -DTARGET_UNIX -DGCC -DUSES_16BIT_ONLY -D__SDL__ -fomit-frame-pointer -march=pentium \
-         -mpentium -finline-functions -fexpensive-optimizations -funroll-loops -funroll-all-loops -pipe \
-         -fschedule-insns2 -fstrength-reduce -malign-double -mfancy-math-387 -ffast-math -fforce-addr \
-         -fforce-mem `sdl-config --cflags` \
-         -L$(STDLIB) -L$(SDLLIB) -I$(STDINCLUDE) -I$(SDLINCLUDE)
+CFLAGS += -DUNIX -DTARGET_UNIX -DGCC -DUSES_16BIT_ONLY -D__SDL__
 
-LDFLAGS = $(CFLAGS)
+LDFLAGS += `sdl-config --libs`
 
 TARGET = cygne
 
-OBJ = ddrawsdl.o filessdl.o gfx.o nec.o tcache.o memory.o mainsdl.o zlib/unzip.o
+OBJ = ddrawsdl.o filessdl.o gfx.o nec.o tcache.o memory.o mainsdl.o unzip.o
 
 LIBS = `sdl-config --libs` -lz
 
@@ -28,17 +23,22 @@ INCS = -I. `sdl-config --cflags`
 
 THECC = $(CC) $(CFLAGS) $(INCS)
 
-%.o: %.asm
+.SUFFIXES: .asm
+
+.asm.o:
 	$(NASM) -f elf -o $@ $<
 
-%.o: %.c
-	$(THECC) -c $< -o $@
+.c.o:
+	$(CC) $(CFLAGS) $(INCS) -c $< -o $@
+
+.cpp.o:
+	$(CXX) $(CFLAGS) $(INCS) -c $< -o $@
 
-%.o: %.cpp
-	$(THECC) -c $< -o $@
+unzip.o:
+	$(CC) $(CFLAGS) $(INCS) -c zlib/unzip.c -o $@
 
-cygne: $(OBJ) Makefile
-	$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+cygne: $(OBJ)
+	$(CXX) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
 	 
 clean:
 	rm -f cygne *.o zlib/*.o