/[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 1263 - (show annotations)
Sat May 9 22:00:37 2015 UTC (4 years, 5 months ago) by mmu_man
File size: 798 byte(s)
Make some libs and C++ std overrideable

On Haiku we need -lncurses instead, for example.

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 CURSES_LIB ?= -lcurses
37 STDCXX_LIB ?= -lstdc++
38 COMMON_EXTRA_LDFLAGS += $(CURSES_LIB) $(STDCXX_LIB)
39 CXXSTD ?= -std=c++11
40 CXXFLAGS += $(CXXSTD)
41 CPPFLAGS += -D__cdecl= -DPOSIX
42 CFLAGS += -Wall
43 endif
44

  ViewVC Help
Powered by ViewVC 1.1.26