NTOSKRNL.ZwXXX functions now call NTOSKRNL.NtXXX via int 0x2e.
[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 CP = cp
18 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
19 NASM_CMD = nasm
20 KM_SPECS = $(TOPDIR)/specs
21 endif
22
23 ifeq ($(HOST),mingw32-windows)
24 NASM_FORMAT = win32
25 PREFIX =
26 EXE_POSTFIX = .exe
27 CP = copy
28 DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
29 NASM_CMD = nasm
30 RM = del
31 KM_SPECS = specs
32 DOSCLI = yes
33 FLOPPY_DIR=A:
34 DIST_DIR=dist
35 endif
36
37 #
38 # Create variables for all the compiler tools
39 #
40 ifeq ($(WITH_DEBUGGING),yes)
41 DEBUGGING_CFLAGS = -g
42 else
43 DEBUGGING_CFLAGS =
44 endif
45
46 ifeq ($(WARNINGS_ARE_ERRORS),yes)
47 EXTRA_CFLAGS = -Werror
48 endif
49
50 DEFINES = -DDBG
51
52 ifeq ($(WIN32_LEAN_AND_MEAN),yes)
53 LEAN_AND_MEAN_DEFINE = -DWIN32_LEAN_AND_MEAN
54 else
55 LEAN_AND_MEAN_DEFINE =
56 endif
57
58 CC = $(PREFIX)gcc
59 NATIVE_CC = gcc
60 CFLAGS = -O2 -I../../../include -I../../include \
61 -I../include -fno-builtin $(LEAN_AND_MEAN_DEFINE) \
62 $(DEFINES) -Wall -Wstrict-prototypes $(DEBUGGING_CFLAGS) \
63 $(EXTRA_CFLAGS)
64 CXXFLAGS = $(CFLAGS)
65 NFLAGS = -i../../include/ -i../include/ -pinternal/asm.inc -f$(NASM_FORMAT) -d$(NASM_FORMAT)
66 LD = $(PREFIX)ld
67 NM = $(PREFIX)nm
68 OBJCOPY = $(PREFIX)objcopy
69 STRIP = $(PREFIX)strip
70 AS = $(PREFIX)gcc -c -x assembler-with-cpp
71 CPP = $(PREFIX)cpp
72 AR = $(PREFIX)ar
73 RC = $(PREFIX)windres
74
75 %.o: %.cc
76 $(CC) $(CFLAGS) -c $< -o $@
77 %.o: %.c
78 $(CC) $(CFLAGS) -c $< -o $@
79 %.o: %.asm
80 $(NASM_CMD) $(NFLAGS) $< -o $@
81 %.coff: %.rc
82 $(RC) $< $@
83
84
85 RULES_MAK_INCLUDED = 1