/[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 869 - (show annotations)
Tue Sep 25 21:57:34 2012 UTC (7 years, 5 months ago) by mmu_man
File size: 417 byte(s)
Add a global rule files

* this will be included by other makefiles
* add required machinery to support cross-compiling with mingw32.

1
2 #HOSTOS := $(shell uname -s)
3 #PLATFORM ?= $(HOSTOS)
4
5 ifeq ($(PLATFORM),win32)
6 EXE = .exe
7 .SUFFIXES: .exe
8 CROSS_COMPILE ?= i586-mingw32msvc-
9 CC := $(CROSS_COMPILE)$(CC)
10 CXX := $(CROSS_COMPILE)$(CXX)
11 AR := $(CROSS_COMPILE)$(AR)
12 WINDRES := $(CROSS_COMPILE)windres
13
14 # add default rules for exe files
15 %.exe: %.o
16 $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
17
18 %.exe: %.c
19 $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
20
21 endif
22
23
24

  ViewVC Help
Powered by ViewVC 1.1.26