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
|
Line | |
---|
1 | UNAME := $(shell uname -s)
|
---|
2 | ifeq ("Linux","$(UNAME)")
|
---|
3 | GCC := i686-w64-mingw32-gcc
|
---|
4 | WINDRES := i686-w64-mingw32-windres
|
---|
5 | else
|
---|
6 | GCC := gcc
|
---|
7 | WINDRES := windres
|
---|
8 | endif
|
---|
9 |
|
---|
10 | DEF = NOFLATLINE
|
---|
11 | GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-unused-variable -Wno-unused-parameter -D $(DEF)
|
---|
12 | LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll
|
---|
13 | LOCALE = LC_MESSAGES=C
|
---|
14 |
|
---|
15 | #LIBS = -lwinmm -lopengl32 -lgdi32
|
---|
16 | LIBS = -lgdi32 -lwsock32
|
---|
17 | OBJS = src/binkw32.def
|
---|
18 | OUT = build/binkw32.dll
|
---|
19 |
|
---|
20 | FOLDERS = patches
|
---|
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
|
---|
22 | DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
|
---|
23 |
|
---|
24 |
|
---|
25 | ALL: $(FOLDERS) $(DEST) $(OBJS)
|
---|
26 | @echo "Linking"
|
---|
27 | $(LOCALE) $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
|
---|
28 |
|
---|
29 | clean:
|
---|
30 | rm $(DEST)
|
---|
31 | rm -R $(FOLDERS)
|
---|
32 | rm $(OUT)
|
---|
33 |
|
---|
34 | $(FOLDERS):
|
---|
35 | mkdir -p build/$@
|
---|
36 |
|
---|
37 | build/%.o: src/%.c
|
---|
38 | @echo "Compiling $<"
|
---|
39 | $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $<
|
---|
40 | @echo
|
---|
41 |
|
---|
42 | build/%.o: src/%.rc
|
---|
43 | @echo "Assembling resource $<"
|
---|
44 | $(WINDRES) -i $< -o $@
|
---|
45 | @echo
|
---|
46 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.