Changeset 983 for Daodan/makefile
- Timestamp:
- Mar 16, 2014, 9:06:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/makefile
r877 r983 1 FOLDERS = patches flatline 2 FILES = Daodan.c Daodan_BSL.c Daodan_Character.c Daodan_Cheater.c Daodan_Config.c Daodan_Console.c Daodan_GL.c Daodan_Patch.c Daodan_Persistence.c Daodan_Utility.c Daodan_Win32.c Inifile_Reader.c _DLLInfo.rc patches/Patches.c flatline/Flatline.c flatline/Flatline_BSL.c flatline/Flatline_Client.c flatline/Flatline_Hooks.c flatline/Flatline_Net.c flatline/Flatline_Packet.c flatline/Flatline_PacketReader.c flatline/Flatline_PacketBuilder.c flatline/Flatline_Server.c flatline/Flatline_Win32.c flatline/Mariusnet.c flatline/Flatline_Events.c 1 SRC = src 2 TARGET = build 3 SUBFOLDERS = patches flatline beaengine 3 4 4 DEF = 5 GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-unused-variable -Wno-unused-parameter $(addprefix -D,$(DEF)) 5 DEF = BEA_ENGINE_STATIC 6 INCLUDEPATHS = . 7 GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-pragmas -Wno-unused-variable $(addprefix -I$(SRC)/,$(INCLUDEPATHS)) -Wno-unused-parameter $(addprefix -D,$(DEF)) 6 8 LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll 7 9 LOCALE = LC_MESSAGES=C … … 9 11 #LIBS = -lwinmm -lopengl32 10 12 LIBS = -lgdi32 -lwsock32 11 OBJS = src/binkw32.def12 OUT = build/binkw32.dll13 OBJS = $(SRC)/binkw32.def 14 OUT = $(TARGET)/binkw32.dll 13 15 16 FILES := src/_DLLInfo.rc $(foreach dir,. $(SUBFOLDERS),$(wildcard $(SRC)/$(dir)/*.c)) 14 17 15 18 ################################################### … … 28 31 endif 29 32 30 DESTFOLDERS = $(addprefix build/,$(FOLDERS)) 31 SRC = $(addprefix src/,$(FILES)) 32 DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC))) 33 DESTFOLDERS = $(addprefix $(TARGET)/,$(SUBFOLDERS)) 34 DEST = $(patsubst $(SRC)/%.rc,$(TARGET)/%.o,$(patsubst $(SRC)/%.c,$(TARGET)/%.o,$(FILES))) 33 35 34 36 ALL: $(DESTFOLDERS) $(DEST) $(OBJS) … … 37 39 38 40 clean: 39 rm $(DEST)40 rm -R $(DESTFOLDERS)41 rm $(OUT)41 rm -f $(DEST) 42 rm -Rf $(DESTFOLDERS) 43 rm -f $(OUT) 42 44 43 45 $(DESTFOLDERS): 44 46 mkdir -p $@ 45 47 46 build/%.o: src/%.c48 $(TARGET)/%.o: $(SRC)/%.c 47 49 @echo "Compiling $<" 48 50 $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $< 49 51 @echo 50 52 51 build/%.o: src/%.rc53 $(TARGET)/%.o: $(SRC)/%.rc 52 54 @echo "Assembling resource $<" 53 55 $(WINDRES) -i $< -o $@
Note:
See TracChangeset
for help on using the changeset viewer.