Last change
on this file since 687 was 687, checked in by alloc, 12 years ago |
Daodan: Fixes to both makefile and binkw32.def to make it work with newer GCC/LD-releases
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Rev | Line | |
---|
[684] | 1 | UNAME := $(shell uname -s)
|
---|
[683] | 2 | ifeq ("Linux","$(UNAME)")
|
---|
| 3 | GCC := i686-w64-mingw32-gcc
|
---|
[685] | 4 | WINDRES := i686-w64-mingw32-windres
|
---|
[683] | 5 | else
|
---|
| 6 | GCC := gcc
|
---|
[685] | 7 | WINDRES := windres
|
---|
[683] | 8 | endif
|
---|
| 9 |
|
---|
[678] | 10 | GCCFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct
|
---|
[687] | 11 | LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll
|
---|
[678] | 12 |
|
---|
| 13 | #LIBS = -lwinmm -lopengl32 -lgdi32
|
---|
| 14 | LIBS = -lgdi32
|
---|
[684] | 15 | OBJS = src/binkw32.def
|
---|
[678] | 16 | OUT = build/binkw32.dll
|
---|
| 17 |
|
---|
[686] | 18 | SRC = src/Daodan.c src/Daodan_BSL.c src/Daodan_Character.c src/Daodan_Cheater.c src/Daodan_Console.c src/daodan_gl.c src/Daodan_Patch.c src/Daodan_Persistence.c src/Daodan_Utility.c src/Daodan_Win32.c src/Daodan_WindowHack.c src/inifile_reader.c src/Oni_Symbols.c src/_DLLInfo.rc
|
---|
[685] | 19 | DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
|
---|
[678] | 20 |
|
---|
[684] | 21 | ALL: $(DEST) $(OBJS)
|
---|
[678] | 22 | echo "Linking $<"
|
---|
| 23 | $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
|
---|
| 24 |
|
---|
| 25 | clean:
|
---|
| 26 | rm $(DEST)
|
---|
| 27 | rm $(OUT)
|
---|
| 28 |
|
---|
| 29 | build/%.o: src/%.c
|
---|
| 30 | echo "Compiling $<"
|
---|
| 31 | $(GCC) $(GCCFLAGS) -c -o $@ $<
|
---|
| 32 | echo
|
---|
| 33 |
|
---|
[685] | 34 | build/%.o: src/%.rc
|
---|
| 35 | echo "Assembling resource $<"
|
---|
| 36 | $(WINDRES) -i $< -o $@
|
---|
| 37 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.