Added two missing names.
[reactos.git] / reactos / rules.mak
1 #
2 # Important
3 #
4 .EXPORT_ALL_VARIABLES:
5
6 ifeq ($(HOST),mingw32-linux)
7 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
8 endif
9
10 #
11 # Choose various options
12 #
13 ifeq ($(HOST),mingw32-linux)
14 NASM_FORMAT = win32
15 PREFIX = i586-mingw32-
16 EXE_POSTFIX =
17 EXE_PREFIX = ./
18 CP = cp
19 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
20 NASM_CMD = nasm
21 KM_SPECS = $(TOPDIR)/specs
22 FLOPPY_DIR = /a
23 # DIST_DIR should be relative from the top of the tree
24 DIST_DIR = dist
25 endif
26
27 ifeq ($(HOST),mingw32-windows)
28 NASM_FORMAT = win32
29 PREFIX =
30 EXE_POSTFIX = .exe
31 CP = copy
32 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
33 NASM_CMD = nasm
34 RM = del
35 KM_SPECS = specs
36 DOSCLI = yes
37 FLOPPY_DIR = A:
38 # DIST_DIR should be relative from the top of the tree
39 DIST_DIR = dist
40 endif
41
42 #
43 # Create variables for all the compiler tools
44 #
45 ifeq ($(WITH_DEBUGGING),yes)
46 DEBUGGING_CFLAGS = -g
47 else
48 DEBUGGING_CFLAGS =
49 endif
50
51 ifeq ($(WARNINGS_ARE_ERRORS),yes)
52 EXTRA_CFLAGS = -Werror
53 endif
54
55 DEFINES = -DDBG
56
57 ifeq ($(WIN32_LEAN_AND_MEAN),yes)
58 LEAN_AND_MEAN_DEFINE = -DWIN32_LEAN_AND_MEAN
59 else
60 LEAN_AND_MEAN_DEFINE =
61 endif
62
63 CC = $(PREFIX)gcc
64 NATIVE_CC = gcc
65 NATIVE_NM = nm
66 CFLAGS = $(BASE_CFLAGS) \
67 -pipe \
68 -O2 \
69 -Iinclude \
70 -fno-builtin $(LEAN_AND_MEAN_DEFINE) \
71 $(DEFINES) -Wall \
72 -Wstrict-prototypes $(DEBUGGING_CFLAGS) \
73 $(EXTRA_CFLAGS)
74 CXXFLAGS = $(CFLAGS)
75 NFLAGS = -i../../include/ -i../include/ -pinternal/asm.inc -f$(NASM_FORMAT) -d$(NASM_FORMAT)
76 LD = $(PREFIX)ld
77 NM = $(PREFIX)nm
78 OBJCOPY = $(PREFIX)objcopy
79 STRIP = $(PREFIX)strip
80 AS = $(PREFIX)gcc -c -x assembler-with-cpp
81 CPP = $(PREFIX)cpp
82 AR = $(PREFIX)ar
83 RC = $(PREFIX)windres
84 RCINC = --include-dir ../include --include-dir ../../include --include-dir ../../../include
85
86 %.o: %.cc
87 $(CC) $(CFLAGS) -c $< -o $@
88 %.o: %.c
89 $(CC) $(CFLAGS) -c $< -o $@
90 %.o: %.asm
91 $(NASM_CMD) $(NFLAGS) $< -o $@
92 %.coff: %.rc
93 $(RC) $(RCINC) $< $@
94
95
96 RULES_MAK_INCLUDED = 1