source: Daodan/makefile@ 682

Last change on this file since 682 was 678, checked in by alloc, 12 years ago

Daodan: Updated src to work with MinGW

  • Property svn:executable set to *
File size: 979 bytes
Line 
1GCC = i686-w64-mingw32-gcc
2DLLTOOL = i686-w64-mingw32-dlltool
3
4GCCFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct
5LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll -mthread
6
7#LIBS = -lwinmm -lopengl32 -lgdi32
8LIBS = -lgdi32
9OBJS = obj/binkw32.a
10OUT = build/binkw32.dll
11
12SRC = 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
13DEST = $(patsubst src/%.c,build/%.o,$(SRC))
14
15ALL: $(FOLDERS) $(DEST) $(OBJS)
16 echo "Linking $<"
17 $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
18
19clean:
20 rm $(DEST)
21 rm $(OUT)
22
23obj/binkw32.a: src/binkw32.def
24 echo "Generating binkw32.a"
25 $(DLLTOOL) -d $< -l $@
26
27build/%.o: src/%.c
28 echo "Compiling $<"
29 $(GCC) $(GCCFLAGS) -c -o $@ $<
30 echo
31
32$(FOLDERS):
33 mkdir $@
Note: See TracBrowser for help on using the repository browser.