ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/makefile
Revision: 1163
Committed: Sun Oct 24 02:50:48 2021 UTC (3 years, 11 months ago) by rossy
File size: 1618 byte(s)
Log Message:
Daodan: Add new local input system based on Raw Input

File Contents

# Content
1 # If SRC or TARGET is a folder it must end in a slash "/"
2 SRC =
3 TARGET = ../build/
4 SUBFOLDERS = Patches beaengine
5
6 DEF = BEA_ENGINE_STATIC
7 INCLUDEPATHS = .
8 GCCFLAGS = -std=gnu99 -ggdb -O0 -Wall -fomit-frame-pointer -Wextra -Wno-pragmas -Wno-unused-variable $(addprefix -I,$(INCLUDEPATHS)) -Wno-unused-parameter $(addprefix -D,$(DEF))
9 LINKFLAGS = -O0 -Wall -fomit-frame-pointer -mdll
10 LOCALE = LC_MESSAGES=C
11
12 LIBDIRS =
13 LIBS = -lgdi32 -lwsock32
14 OBJS = $(SRC)binkw32.def
15 OUT = $(TARGET)binkw32.dll
16
17 FILES := _DLLInfo.rc $(foreach dir,. $(SUBFOLDERS),$(wildcard $(SRC)$(dir)/*.c))
18
19 ###################################################
20 # #
21 # Should not be required to change anything below #
22 # #
23 ###################################################
24
25 UNAME := $(shell uname -s)
26 ifeq ("Linux","$(UNAME)")
27 GCC := i686-w64-mingw32-gcc
28 WINDRES := i686-w64-mingw32-windres
29 else
30 GCC := gcc
31 WINDRES := windres
32 endif
33
34 DESTFOLDERS = $(addprefix $(TARGET),$(SUBFOLDERS))
35 DEST = $(patsubst $(SRC)%.rc,$(TARGET)%.o,$(patsubst $(SRC)%.c,$(TARGET)%.o,$(FILES)))
36
37 ALL: $(DESTFOLDERS) $(DEST) $(OBJS)
38 @echo "Linking"
39 $(LOCALE) $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBDIRS) $(LIBS)
40
41 clean:
42 rm -f $(DEST)
43 rm -Rf $(DESTFOLDERS)
44 rm -f $(OUT)
45
46 $(DESTFOLDERS):
47 mkdir -p $@
48
49 $(TARGET)%.o: $(SRC)%.c
50 @echo "Compiling $<"
51 $(LOCALE) $(GCC) $(GCCFLAGS) -c -o $@ $<
52 @echo
53
54 $(TARGET)%.o: $(SRC)%.rc
55 @echo "Assembling resource $<"
56 $(WINDRES) -i $< -o $@
57 @echo
58

Properties

Name Value
svn:executable *