62 lines
1.6 KiB
Text
62 lines
1.6 KiB
Text
$NetBSD: patch-aa,v 1.3 2005/11/03 21:38:04 rillig Exp $
|
|
|
|
--- src/Makefiles/Makefile.unix.orig 2002-03-26 17:50:55.000000000 +0100
|
|
+++ src/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
|