ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/makefile
Revision: 678
Committed: Sat Mar 2 23:46:39 2013 UTC (12 years, 7 months ago) by alloc
File size: 979 byte(s)
Log Message:
Daodan: Updated src to work with MinGW

File Contents

# Content
1 GCC = i686-w64-mingw32-gcc
2 DLLTOOL = i686-w64-mingw32-dlltool
3
4 GCCFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct
5 LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll -mthread
6
7 #LIBS = -lwinmm -lopengl32 -lgdi32
8 LIBS = -lgdi32
9 OBJS = obj/binkw32.a
10 OUT = build/binkw32.dll
11
12 SRC = src/Daodan.c src/Daodan_BSL.c src/Daodan_Character.c src/Daodan_Cheater.c src/Daodan_Console.c src/Daodan_DLLStubs.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
13 DEST = $(patsubst src/%.c,build/%.o,$(SRC))
14
15 ALL: $(FOLDERS) $(DEST) $(OBJS)
16 echo "Linking $<"
17 $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
18
19 clean:
20 rm $(DEST)
21 rm $(OUT)
22
23 obj/binkw32.a: src/binkw32.def
24 echo "Generating binkw32.a"
25 $(DLLTOOL) -d $< -l $@
26
27 build/%.o: src/%.c
28 echo "Compiling $<"
29 $(GCC) $(GCCFLAGS) -c -o $@ $<
30 echo
31
32 $(FOLDERS):
33 mkdir $@

Properties

Name Value
svn:executable *