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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1204 - (show annotations)
Sat Sep 20 18:06:00 2014 UTC (5 years, 2 months ago) by mmu_man
File size: 722 byte(s)
Also link to libstdc++ when using libcommon.a

1
2 RANLIB ?= ranlib
3
4 #HOSTOS := $(shell uname -s)
5 #PLATFORM ?= $(HOSTOS)
6
7 ifeq ($(RELEASE),)
8 DEBUG = 1
9 CPPFLAGS += -D_DEBUG
10 else
11 CPPFLAGS += -DNDEBUG
12 endif
13
14 ifeq ($(PLATFORM),win32)
15 EXE = .exe
16 .SUFFIXES: .exe
17 CROSS_COMPILE ?= i586-mingw32msvc-
18 CC := $(CROSS_COMPILE)$(CC)
19 CXX := $(CROSS_COMPILE)$(CXX)
20 AR := $(CROSS_COMPILE)$(AR)
21 RANLIB := $(CROSS_COMPILE)$(RANLIB)
22 WINDRES := $(CROSS_COMPILE)windres
23 CPPFLAGS += -DWIN32
24
25 # add default rules for exe files
26 %.exe: %.o
27 $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
28
29 %.exe: %.c
30 $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
31
32 endif
33
34
35 ifneq ($(PLATFORM),win32)
36 COMMON_EXTRA_LDFLAGS += -lcurses -lstdc++
37 CXXFLAGS += -std=c++11
38 CPPFLAGS += -D__cdecl= -DPOSIX
39 CFLAGS += -Wall
40 endif
41

  ViewVC Help
Powered by ViewVC 1.1.26