Added help command to shell.exe.
[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 FLOPPY_DIR = A/
26 # DIST_DIR should be relative from the top of the tree
27 DIST_DIR = dist
28 endif
29
30
31 ifeq ($(HOST),mingw32-windows)
32 PREFIX =
33 EXE_POSTFIX = .exe
34 CP = copy
35 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
36 RM = del
37 DOSCLI = yes
38 FLOPPY_DIR = A:
39 # DIST_DIR should be relative from the top of the tree
40 DIST_DIR = dist
41 endif
42
43 #
44 # Create variables for all the compiler tools
45 #
46 ifeq ($(WITH_DEBUGGING),yes)
47 DEBUGGING_CFLAGS = -g
48 else
49 DEBUGGING_CFLAGS =
50 endif
51
52 ifeq ($(WARNINGS_ARE_ERRORS),yes)
53 EXTRA_CFLAGS = -Werror
54 endif
55
56 DEFINES = -DDBG
57
58 ifeq ($(WIN32_LEAN_AND_MEAN),yes)
59 LEAN_AND_MEAN_DEFINE = -DWIN32_LEAN_AND_MEAN
60 else
61 LEAN_AND_MEAN_DEFINE =
62 endif
63
64 CC = $(PREFIX)gcc
65 NATIVE_CC = gcc
66 CFLAGS = \
67 -pipe \
68 -O2 \
69 -Wall \
70 -Wstrict-prototypes \
71 -fno-builtin \
72 $(LEAN_AND_MEAN_DEFINE) \
73 $(DEFINES) \
74 $(DEBUGGING_CFLAGS) \
75 $(EXTRA_CFLAGS)
76 CXXFLAGS = $(CFLAGS)
77 LD = $(PREFIX)ld
78 NM = $(PREFIX)nm
79 OBJCOPY = $(PREFIX)objcopy
80 STRIP = $(PREFIX)strip
81 AS = $(PREFIX)gcc -c -x assembler-with-cpp
82 CPP = $(PREFIX)cpp
83 AR = $(PREFIX)ar
84 RC = $(PREFIX)windres
85 RCINC = --include-dir ../reactos/include --include-dir ../../reactos/include --include-dir ../../../reactos/include
86
87 %.o: %.cc
88 $(CC) $(CFLAGS) -c $< -o $@
89 %.o: %.c
90 $(CC) $(CFLAGS) -c $< -o $@
91 %.o: %.asm
92 $(NASM_CMD) $(NFLAGS) $< -o $@
93 %.coff: %.rc
94 $(RC) $(RCINC) $< $@
95
96
97
98 RULES_MAK_INCLUDED = 1