Changeset 983 for Daodan/makefile


Ignore:
Timestamp:
Mar 16, 2014, 9:06:52 PM (11 years ago)
Author:
alloc
Message:

Daodan:

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
     1SRC = src
     2TARGET = build
     3SUBFOLDERS = patches flatline beaengine
    34
    4 DEF =
    5 GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-unused-variable -Wno-unused-parameter $(addprefix -D,$(DEF))
     5DEF = BEA_ENGINE_STATIC
     6INCLUDEPATHS = .
     7GCCFLAGS = -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))
    68LINKFLAGS = -O0 -Wall -fomit-frame-pointer -fpack-struct -s -mdll
    79LOCALE = LC_MESSAGES=C
     
    911#LIBS = -lwinmm -lopengl32
    1012LIBS = -lgdi32 -lwsock32
    11 OBJS = src/binkw32.def
    12 OUT = build/binkw32.dll
     13OBJS = $(SRC)/binkw32.def
     14OUT = $(TARGET)/binkw32.dll
    1315
     16FILES := src/_DLLInfo.rc $(foreach dir,. $(SUBFOLDERS),$(wildcard $(SRC)/$(dir)/*.c))
    1417
    1518###################################################
     
    2831endif
    2932
    30 DESTFOLDERS = $(addprefix build/,$(FOLDERS))
    31 SRC = $(addprefix src/,$(FILES))
    32 DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
     33DESTFOLDERS = $(addprefix $(TARGET)/,$(SUBFOLDERS))
     34DEST = $(patsubst $(SRC)/%.rc,$(TARGET)/%.o,$(patsubst $(SRC)/%.c,$(TARGET)/%.o,$(FILES)))
    3335
    3436ALL: $(DESTFOLDERS) $(DEST) $(OBJS)
     
    3739
    3840clean:
    39         rm $(DEST)
    40         rm -R $(DESTFOLDERS)
    41         rm $(OUT)
     41        rm -f $(DEST)
     42        rm -Rf $(DESTFOLDERS)
     43        rm -f $(OUT)
    4244
    4345$(DESTFOLDERS):
    4446        mkdir -p $@
    4547
    46 build/%.o: src/%.c
     48$(TARGET)/%.o: $(SRC)/%.c
    4749        @echo "Compiling $<"
    4850        $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $<
    4951        @echo
    5052
    51 build/%.o: src/%.rc
     53$(TARGET)/%.o: $(SRC)/%.rc
    5254        @echo "Assembling resource $<"
    5355        $(WINDRES) -i $< -o $@
Note: See TracChangeset for help on using the changeset viewer.