Last change
on this file since 846 was 839, checked in by alloc, 12 years ago |
Daodan:
- Fixes #42
- Breaking out patches to own file
|
-
Property svn:executable
set to
*
|
File size:
1.2 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 |
|
---|
[689] | 10 | GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-unused-variable -Wno-unused-parameter
|
---|
[687] | 11 | LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll
|
---|
[688] | 12 | LOCALE = LC_MESSAGES=C
|
---|
[678] | 13 |
|
---|
| 14 | #LIBS = -lwinmm -lopengl32 -lgdi32
|
---|
| 15 | LIBS = -lgdi32
|
---|
[684] | 16 | OBJS = src/binkw32.def
|
---|
[678] | 17 | OUT = build/binkw32.dll
|
---|
| 18 |
|
---|
[839] | 19 | FOLDERS = patches
|
---|
| 20 | SRC = src/Daodan.c src/Daodan_BSL.c src/Daodan_Character.c src/Daodan_Cheater.c src/Daodan_Config.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/Inifile_Reader.c src/_DLLInfo.rc src/patches/Patches.c
|
---|
[685] | 21 | DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
|
---|
[678] | 22 |
|
---|
[839] | 23 | ALL: $(FOLDERS) $(DEST) $(OBJS)
|
---|
| 24 | @echo "Linking"
|
---|
[688] | 25 | $(LOCALE) $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
|
---|
[678] | 26 |
|
---|
| 27 | clean:
|
---|
| 28 | rm $(DEST)
|
---|
[839] | 29 | rm -R $(FOLDERS)
|
---|
[678] | 30 | rm $(OUT)
|
---|
| 31 |
|
---|
[839] | 32 | $(FOLDERS):
|
---|
| 33 | mkdir -p build/$@
|
---|
| 34 |
|
---|
[678] | 35 | build/%.o: src/%.c
|
---|
[689] | 36 | @echo "Compiling $<"
|
---|
[688] | 37 | $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $<
|
---|
[689] | 38 | @echo
|
---|
[678] | 39 |
|
---|
[685] | 40 | build/%.o: src/%.rc
|
---|
[689] | 41 | @echo "Assembling resource $<"
|
---|
[685] | 42 | $(WINDRES) -i $< -o $@
|
---|
[689] | 43 | @echo
|
---|
[685] | 44 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.