source: AE/RequestHelp/src/makefile@ 1152

Last change on this file since 1152 was 1006, checked in by alloc, 10 years ago

RequestHelp: Fixed console showing

  • Property svn:executable set to *
File size: 1.6 KB
RevLine 
[1005]1# If SRC or TARGET is a folder it must end in a slash "/"
2SRC =
3TARGET = ../build/
4SUBFOLDERS = quickmail
5
6DEF = NOCURL STATIC
7INCLUDEPATHS = . ./quickmail
8GCCFLAGS = -std=c99 -O0 -Wall -fomit-frame-pointer -fpack-struct -Wextra -Wno-pragmas -Wno-unused-variable $(addprefix -I,$(INCLUDEPATHS)) -Wno-unused-parameter $(addprefix -D,$(DEF))
[1006]9LINKFLAGS = -Os -Wall -mwindows
[1005]10LOCALE = LC_MESSAGES=C
11
12LIBDIRS =
13LIBS = -lwsock32
14#-lgdi32
15OUT = $(TARGET)RequestHelp.exe
16
17FILES := _VersionInfo.rc $(foreach dir,. $(SUBFOLDERS),$(wildcard $(SRC)$(dir)/*.c))
18
19###################################################
20# #
21# Should not be required to change anything below #
22# #
23###################################################
24
25UNAME := $(shell uname -s)
26ifeq ("Linux","$(UNAME)")
27 GCC := i686-w64-mingw32-gcc
28 WINDRES := i686-w64-mingw32-windres
29else
30 GCC := gcc
31 WINDRES := windres
32endif
33
34DESTFOLDERS = $(addprefix $(TARGET),$(SUBFOLDERS))
35DEST = $(patsubst $(SRC)%.rc,$(TARGET)%.o,$(patsubst $(SRC)%.c,$(TARGET)%.o,$(FILES)))
36
37ALL: $(DESTFOLDERS) $(DEST) $(OBJS)
38 @echo "Linking"
39 $(LOCALE) $(GCC) $(LINKFLAGS) -o $(OUT) $(DEST) $(OBJS) $(LIBDIRS) $(LIBS)
40
41clean:
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
Note: See TracBrowser for help on using the repository browser.