From cb6597f9e192b13546295c030ad98bad4f041648 Mon Sep 17 00:00:00 2001 From: Felix Wallin Date: Mon, 20 Dec 2010 14:05:36 +0100 Subject: [PATCH] makefile changes --- Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 947ce9db3..40600fa4b 100755 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ SOURCES := src/*.c CFLAGS := -w -std=c99 -D_POSIX_C_SOURCE=200112L -Iincludes/ OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -LFLAGS := -lSDL -lm -lbz2 +LFLAGS := -B static -lSDL -lm -lbz2 MFLAGS_SSE3 := -march=native -DX86 -DX86_SSE3 -msse3 MFLAGS_SSE2 := -march=native-DX86 -DX86_SSE2 -msse2 MFLAGS_SSE := -march=native -DX86 -DX86_SSE @@ -13,29 +13,37 @@ WIN32_TARG := powder-sse.exe powder-sse2.exe powder: $(SOURCES) $(COMPILER) -DINTERNAL -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64 + mv $@ build powder-debug-64: $(SOURCES) $(COMPILER) -m64 -o$@ $(FLAGS_DBUG) -DLIN64 $(SOURCES) -Iincludes/ + mv $@ build powder-debug: $(SOURCES) $(COMPILER) -m32 -o$@ $(FLAGS_DBUG) -DLIN32 $(SOURCES) -Iincludes/ - + mv $@ build powder-sse3: $(SOURCES) $(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN32 strip $@ + mv $@ build powder-sse2: $(SOURCES) $(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE2) $(SOURCES) -DLIN32 strip $@ + mv $@ build powder-sse: $(SOURCES) $(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE) $(SOURCES) -DLIN32 strip $@ + mv $@ build powder-64-sse3-opengl: $(SOURCES) $(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64 -lGL -lGLU -DOpenGL strip $@ + mv $@ build powder-64-sse3: $(SOURCES) $(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64 strip $@ + mv $@ build powder-64-sse2: $(SOURCES) $(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE2) $(SOURCES) -DLIN64 strip $@ + mv $@ build powder-res.o: powder-res.rc powder.ico i586-mingw32msvc-windres powder-res.rc powder-res.o @@ -44,18 +52,22 @@ powder-sse3.exe: $(SOURCES) powder-res.o i586-mingw32msvc-gcc -o$@ $(CFLAGS) $(OFLAGS) $(MFLAGS_SSE3) $(SOURCES) powder-res.o -lmingw32 -lws2_32 -lSDLmain $(LFLAGS) -mwindows -DWIN32 strip $@ chmod 0644 $@ + mv $@ build powder-sse2.exe: $(SOURCES) powder-res.o i586-mingw32msvc-gcc -o$@ $(CFLAGS) $(OFLAGS) $(MFLAGS_SSE2) $(SOURCES) powder-res.o -lmingw32 -lws2_32 -lSDLmain $(LFLAGS) -mwindows -DWIN32 strip $@ chmod 0644 $@ + mv $@ build powder-sse.exe: $(SOURCES) powder-res.o i586-mingw32msvc-gcc -o$@ $(CFLAGS) $(OFLAGS) $(MFLAGS_SSE) $(SOURCES) powder-res.o -lmingw32 -lws2_32 -lSDLmain $(LFLAGS) -mwindows -DWIN32 strip $@ chmod 0644 $@ - + mv $@ build powder-x: $(SOURCES) gcc -o $@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS) $(SOURCES) -lSDLmain -DMACOSX -DPIX32BGRA -arch x86_64 -framework Cocoa -ggdb strip $@ + mv $@ build powder-x-ogl: $(SOURCES) gcc -o $@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS) $(SOURCES) -lSDLmain -DOpenGL -DMACOSX -DPIX32BGRA -arch x86_64 -framework Cocoa -framework OpenGL -ggdb strip $@ + mv $@ build \ No newline at end of file