Last change
on this file since 876 was 876, checked in by gumby, 11 years ago |
Daodan pass 1
|
-
Property svn:executable
set to
*
|
File size:
1.5 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 |
|
---|
[876] | 10 | DEF = NOFLATLINE
|
---|
| 11 | GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-unused-variable -Wno-unused-parameter -D $(DEF)
|
---|
[687] | 12 | LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll
|
---|
[688] | 13 | LOCALE = LC_MESSAGES=C
|
---|
[678] | 14 |
|
---|
| 15 | #LIBS = -lwinmm -lopengl32 -lgdi32
|
---|
[876] | 16 | LIBS = -lgdi32 -lwsock32
|
---|
| 17 | OBJS = src/binkw32.def
|
---|
[678] | 18 | OUT = build/binkw32.dll
|
---|
| 19 |
|
---|
[839] | 20 | FOLDERS = patches
|
---|
[876] | 21 | 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 src/Flatline.c src/Flatline_BSL.c src/Flatline_Client.c src/Flatline_Hooks.c src/Flatline_Net.c src/Flatline_Packet.c src/Flatline_PacketReader.c src/Flatline_PacketBuilder.c src/Flatline_Server.c src/Flatline_Win32.c src/Mariusnet.c src/Flatline_Events.c
|
---|
[685] | 22 | DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
|
---|
[678] | 23 |
|
---|
[876] | 24 |
|
---|
[839] | 25 | ALL: $(FOLDERS) $(DEST) $(OBJS)
|
---|
| 26 | @echo "Linking"
|
---|
[688] | 27 | $(LOCALE) $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
|
---|
[678] | 28 |
|
---|
| 29 | clean:
|
---|
| 30 | rm $(DEST)
|
---|
[839] | 31 | rm -R $(FOLDERS)
|
---|
[678] | 32 | rm $(OUT)
|
---|
| 33 |
|
---|
[839] | 34 | $(FOLDERS):
|
---|
| 35 | mkdir -p build/$@
|
---|
| 36 |
|
---|
[678] | 37 | build/%.o: src/%.c
|
---|
[689] | 38 | @echo "Compiling $<"
|
---|
[688] | 39 | $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $<
|
---|
[689] | 40 | @echo
|
---|
[678] | 41 |
|
---|
[685] | 42 | build/%.o: src/%.rc
|
---|
[689] | 43 | @echo "Assembling resource $<"
|
---|
[685] | 44 | $(WINDRES) -i $< -o $@
|
---|
[689] | 45 | @echo
|
---|
[685] | 46 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.