summaryrefslogtreecommitdiff
blob: efc9d31fc226b54d88a891861c4ac88f201ba188 (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
Make sure the build process respects our LDFLAGS (so we can slip in -m32)
and that the stupid custom OPTIMIZE flags arent used in favor of our own
CFLAGS (so we can slip in -m32).

--- snes9x/Makefile.in
+++ snes9x/Makefile.in
@@ -16,6 +16,7 @@
 @DREAMCAST@
 CHEATS=1
 2XSAI=1
+EXTRALIBS=@LDFLAGS@
 
 #Fairly good and special-char-safe descriptor of the os being built on.
 OS=`uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"`
@@ -186,7 +188,7 @@
 OPTIMISE=-O4 -ffreestanding -ffast-math -fschedule-insns2 -fomit-frame-pointer -fno-inline-functions -fno-defer-pop -fforce-addr -fstrict-aliasing -funroll-loops -fdelete-null-pointer-checks -fno-exceptions
 CPUFLAGS=-ml  -m4-single-only
 else
-OPTIMISE = @OPTIMIZE@
+OPTIMISE = @CFLAGS@
 endif
 
 DEFS += \
@@ -257,8 +259,8 @@
 	@test -d unzip || mkdir unzip
 	@test -d jma || mkdir jma
 
-offsets: offsets.o
-	$(CCC) $(INCLUDES) -o $@ offsets.o
+offsets: offsets.cpp
+	$(CCC) $(EXTRALIBS) $(INCLUDES) -o $@ offsets.cpp
 	./offsets >$(srcdir)/$(CPU)/offsets.h #FIXME: Move to builddir
 
 snes9x: $(OBJECTS) unix/x11.o $(AIDOOBJS)