Last change
on this file since 1006 was 1006, checked in by alloc, 10 years ago |
RequestHelp: Fixed console showing
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Rev | Line | |
---|
[1005] | 1 | # If SRC or TARGET is a folder it must end in a slash "/"
|
---|
| 2 | SRC =
|
---|
| 3 | TARGET = ../build/
|
---|
| 4 | SUBFOLDERS = quickmail
|
---|
| 5 |
|
---|
| 6 | DEF = NOCURL STATIC
|
---|
| 7 | INCLUDEPATHS = . ./quickmail
|
---|
| 8 | GCCFLAGS = -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] | 9 | LINKFLAGS = -Os -Wall -mwindows
|
---|
[1005] | 10 | LOCALE = LC_MESSAGES=C
|
---|
| 11 |
|
---|
| 12 | LIBDIRS =
|
---|
| 13 | LIBS = -lwsock32
|
---|
| 14 | #-lgdi32
|
---|
| 15 | OUT = $(TARGET)RequestHelp.exe
|
---|
| 16 |
|
---|
| 17 | FILES := _VersionInfo.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 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.