/[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 1264 - (show annotations)
Sat May 9 22:06:29 2015 UTC (4 years, 5 months ago) by mmu_man
File size: 816 byte(s)
Remove hardcoded -lm, make it overrideable

Haiku has math stuff in libroot.

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 MATH_LIBS ?= -lm
15
16 ifeq ($(PLATFORM),win32)
17 EXE = .exe
18 .SUFFIXES: .exe
19 CROSS_COMPILE ?= i586-mingw32msvc-
20 CC := $(CROSS_COMPILE)$(CC)
21 CXX := $(CROSS_COMPILE)$(CXX)
22 AR := $(CROSS_COMPILE)$(AR)
23 RANLIB := $(CROSS_COMPILE)$(RANLIB)
24 WINDRES := $(CROSS_COMPILE)windres
25 CPPFLAGS += -DWIN32
26
27 # add default rules for exe files
28 %.exe: %.o
29 $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
30
31 %.exe: %.c
32 $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
33
34 endif
35
36
37 ifneq ($(PLATFORM),win32)
38 CURSES_LIB ?= -lcurses
39 STDCXX_LIB ?= -lstdc++
40 COMMON_EXTRA_LDFLAGS += $(CURSES_LIB) $(STDCXX_LIB)
41 CXXSTD ?= -std=c++11
42 CXXFLAGS += $(CXXSTD)
43 CPPFLAGS += -D__cdecl= -DPOSIX
44 CFLAGS += -Wall
45 endif
46

  ViewVC Help
Powered by ViewVC 1.1.26