2010-09-27 05:53:05 -05:00
|
|
|
SOURCES := src/*.c
|
2010-07-25 09:03:39 -05:00
|
|
|
|
2010-12-06 14:25:13 -06:00
|
|
|
CFLAGS := -w -std=c99 -D_POSIX_C_SOURCE=200112L -Iincludes/
|
2010-07-25 09:03:39 -05:00
|
|
|
OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations
|
2010-12-20 12:14:21 -06:00
|
|
|
LFLAGS := -lSDL -lm -lbz2
|
2010-12-20 12:16:49 -06:00
|
|
|
LFLAGS_X := -lm -lbz2 -lSDLmain
|
2011-01-01 14:02:00 -06:00
|
|
|
MFLAGS_SSE3 := -march=native -DX86 -DX86_SSE3 -msse3
|
|
|
|
MFLAGS_SSE2 := -march=native -DX86 -DX86_SSE2 -msse2
|
|
|
|
MFLAGS_SSE := -march=native -DX86 -DX86_SSE
|
2010-11-03 05:50:48 -05:00
|
|
|
FLAGS_DBUG := -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -pg -DX86 -DX86_SSE3 -msse3 -lSDL -lm -lbz2 -g
|
2010-09-02 18:06:18 -05:00
|
|
|
COMPILER := gcc
|
2010-07-25 09:03:39 -05:00
|
|
|
LINUX_TARG := powder-64-sse2 powder-sse powder-sse2
|
|
|
|
WIN32_TARG := powder-sse.exe powder-sse2.exe
|
|
|
|
|
2010-09-04 16:12:41 -05:00
|
|
|
powder: $(SOURCES)
|
2010-08-11 07:48:32 -05:00
|
|
|
$(COMPILER) -DINTERNAL -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-11-02 10:44:55 -05:00
|
|
|
powder-debug-64: $(SOURCES)
|
|
|
|
$(COMPILER) -m64 -o$@ $(FLAGS_DBUG) -DLIN64 $(SOURCES) -Iincludes/
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-debug: $(SOURCES)
|
2010-11-02 10:44:55 -05:00
|
|
|
$(COMPILER) -m32 -o$@ $(FLAGS_DBUG) -DLIN32 $(SOURCES) -Iincludes/
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-sse3: $(SOURCES)
|
2010-08-11 07:48:32 -05:00
|
|
|
$(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN32
|
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-sse2: $(SOURCES)
|
2010-08-11 07:48:32 -05:00
|
|
|
$(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE2) $(SOURCES) -DLIN32
|
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-sse: $(SOURCES)
|
2010-08-11 07:48:32 -05:00
|
|
|
$(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE) $(SOURCES) -DLIN32
|
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-64-sse3-opengl: $(SOURCES)
|
2010-09-03 07:26:54 -05:00
|
|
|
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64 -lGL -lGLU -DOpenGL
|
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-64-sse3: $(SOURCES)
|
2010-11-01 05:52:26 -05:00
|
|
|
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64
|
2010-08-11 07:48:32 -05:00
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-64-sse2: $(SOURCES)
|
2010-08-11 07:48:32 -05:00
|
|
|
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE2) $(SOURCES) -DLIN64
|
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-07-25 09:03:39 -05:00
|
|
|
|
2010-12-23 17:11:25 -06:00
|
|
|
powder-icc: $(SOURCES)
|
|
|
|
/opt/intel/Compiler/11.1/073/bin/intel64/icc -m64 -o$@ -Iincludes/ -O2 -march=core2 -msse3 -mfpmath=sse -lSDL -lbz2 -lm -xW $(SOURCES) -std=c99 -D_POSIX_C_SOURCE=200112L
|
|
|
|
|
2010-07-25 09:03:39 -05:00
|
|
|
powder-res.o: powder-res.rc powder.ico
|
2010-08-11 07:48:32 -05:00
|
|
|
i586-mingw32msvc-windres powder-res.rc powder-res.o
|
2010-07-25 09:03:39 -05:00
|
|
|
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-sse3.exe: $(SOURCES) powder-res.o
|
2010-08-11 07:48:32 -05:00
|
|
|
i586-mingw32msvc-gcc -o$@ $(CFLAGS) $(OFLAGS) $(MFLAGS_SSE3) $(SOURCES) powder-res.o -lmingw32 -lws2_32 -lSDLmain $(LFLAGS) -mwindows -DWIN32
|
|
|
|
strip $@
|
|
|
|
chmod 0644 $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-sse2.exe: $(SOURCES) powder-res.o
|
2010-08-11 07:48:32 -05:00
|
|
|
i586-mingw32msvc-gcc -o$@ $(CFLAGS) $(OFLAGS) $(MFLAGS_SSE2) $(SOURCES) powder-res.o -lmingw32 -lws2_32 -lSDLmain $(LFLAGS) -mwindows -DWIN32
|
|
|
|
strip $@
|
|
|
|
chmod 0644 $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-sse.exe: $(SOURCES) powder-res.o
|
2010-08-11 07:48:32 -05:00
|
|
|
i586-mingw32msvc-gcc -o$@ $(CFLAGS) $(OFLAGS) $(MFLAGS_SSE) $(SOURCES) powder-res.o -lmingw32 -lws2_32 -lSDLmain $(LFLAGS) -mwindows -DWIN32
|
|
|
|
strip $@
|
|
|
|
chmod 0644 $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-x: $(SOURCES)
|
2010-12-20 12:16:49 -06:00
|
|
|
gcc -o $@ $(CFLAGS) $(OFLAGS) $(LFLAGS_X) $(MFLAGS) $(SOURCES) -DMACOSX -DPIX32BGRA -arch x86_64 -framework Cocoa -framework SDL
|
2010-08-11 07:48:32 -05:00
|
|
|
strip $@
|
2010-12-20 07:05:36 -06:00
|
|
|
mv $@ build
|
2010-09-04 16:12:41 -05:00
|
|
|
powder-x-ogl: $(SOURCES)
|
2010-12-20 12:16:49 -06:00
|
|
|
gcc -o $@ $(CFLAGS) $(OFLAGS) $(LFLAGS_X) $(MFLAGS) $(SOURCES) -DOpenGL -DMACOSX -DPIX32BGRA -arch x86_64 -framework Cocoa -framework SDL -framework OpenGL
|
2010-09-03 04:32:37 -05:00
|
|
|
strip $@
|
2010-12-20 12:14:21 -06:00
|
|
|
mv $@ build
|