source: Daodan/makefile@ 688

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

Daodan: Changed makefile (more warnings, messages always in english, C99), cleaned up symbol Oni definitions

  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[684]1UNAME := $(shell uname -s)
[683]2ifeq ("Linux","$(UNAME)")
3 GCC := i686-w64-mingw32-gcc
[685]4 WINDRES := i686-w64-mingw32-windres
[683]5else
6 GCC := gcc
[685]7 WINDRES := windres
[683]8endif
9
[688]10GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -pedantic -Wextra -Wno-unused-variable
[687]11LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll
[688]12LOCALE = LC_MESSAGES=C
[678]13
14#LIBS = -lwinmm -lopengl32 -lgdi32
15LIBS = -lgdi32
[684]16OBJS = src/binkw32.def
[678]17OUT = build/binkw32.dll
18
[688]19SRC = src/Daodan.c src/Daodan_BSL.c src/Daodan_Character.c src/Daodan_Cheater.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/Daodan_WindowHack.c src/inifile_reader.c src/_DLLInfo.rc
[685]20DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
[678]21
[684]22ALL: $(DEST) $(OBJS)
[678]23 echo "Linking $<"
[688]24 $(LOCALE) $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBS)
[678]25
26clean:
27 rm $(DEST)
28 rm $(OUT)
29
30build/%.o: src/%.c
31 echo "Compiling $<"
[688]32 $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $<
[678]33 echo
34
[685]35build/%.o: src/%.rc
36 echo "Assembling resource $<"
37 $(WINDRES) -i $< -o $@
[688]38 echo
[685]39
Note: See TracBrowser for help on using the repository browser.