/[projet1]/public/pc/tools/rules.mk
Defence Force logotype

Annotation of /public/pc/tools/rules.mk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 875 - (hide annotations)
Tue Sep 25 22:56:17 2012 UTC (7 years, 5 months ago) by mmu_man
File size: 520 byte(s)
Add some defines

* Add WIN32 for win32 builds
* add [_N]DEBUG depending on $(RELEASE)

1 mmu_man 869
2     #HOSTOS := $(shell uname -s)
3     #PLATFORM ?= $(HOSTOS)
4    
5 mmu_man 875 ifeq ($(RELEASE),)
6     DEBUG = 1
7     CPPFLAGS += -D_DEBUG
8     else
9     CPPFLAGS += -DNDEBUG
10     endif
11    
12 mmu_man 869 ifeq ($(PLATFORM),win32)
13     EXE = .exe
14     .SUFFIXES: .exe
15     CROSS_COMPILE ?= i586-mingw32msvc-
16     CC := $(CROSS_COMPILE)$(CC)
17     CXX := $(CROSS_COMPILE)$(CXX)
18     AR := $(CROSS_COMPILE)$(AR)
19     WINDRES := $(CROSS_COMPILE)windres
20 mmu_man 875 CPPFLAGS += -DWIN32
21 mmu_man 869
22     # add default rules for exe files
23     %.exe: %.o
24     $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
25    
26     %.exe: %.c
27     $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
28    
29     endif
30    
31    
32    

  ViewVC Help
Powered by ViewVC 1.1.26