Update for global rules.mak file.
[reactos.git] / rosapps / rules.mak
1 #
2 # Select your host
3 #
4 #HOST = mingw32-linux
5 HOST = mingw32-windows
6
7
8 #
9 # Important
10 #
11 .EXPORT_ALL_VARIABLES:
12
13 ifeq ($(HOST),mingw32-linux)
14 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
15 endif
16
17 #
18 # Choose various options
19 #
20 ifeq ($(HOST),mingw32-linux)
21 PREFIX = i586-mingw32-
22 EXE_POSTFIX =
23 CP = cp
24 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
25 endif
26
27 ifeq ($(HOST),mingw32-windows)
28 PREFIX =
29 EXE_POSTFIX = .exe
30 CP = copy
31 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
32 RM = del
33 DOSCLI = yes
34 endif
35
36 #
37 # Create variables for all the compiler tools
38 #
39 ifeq ($(WITH_DEBUGGING),yes)
40 DEBUGGING_CFLAGS = -g
41 else
42 DEBUGGING_CFLAGS =
43 endif
44
45 ifeq ($(WARNINGS_ARE_ERRORS),yes)
46 EXTRA_CFLAGS = -Werror
47 endif
48
49 DEFINES = -DDBG
50
51 ifeq ($(WIN32_LEAN_AND_MEAN),yes)
52 LEAN_AND_MEAN_DEFINE = -DWIN32_LEAN_AND_MEAN
53 else
54 LEAN_AND_MEAN_DEFINE =
55 endif
56
57 CC = $(PREFIX)gcc
58 NATIVE_CC = gcc
59 CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-builtin \
60 $(LEAN_AND_MEAN_DEFINE) $(DEFINES) $(DEBUGGING_CFLAGS) \
61 $(EXTRA_CFLAGS)
62 CXXFLAGS = $(CFLAGS)
63 LD = $(PREFIX)ld
64 NM = $(PREFIX)nm
65 OBJCOPY = $(PREFIX)objcopy
66 STRIP = $(PREFIX)strip
67 AS = $(PREFIX)gcc -c -x assembler-with-cpp
68 CPP = $(PREFIX)cpp
69 AR = $(PREFIX)ar
70
71 %.o: %.c
72 $(CC) $(CFLAGS) -c $< -o $@
73
74
75 RULES_MAK_INCLUDED = 1