Initial revision
[reactos.git] / reactos / rules.mak
1 #
2 # Important
3 #
4 .EXPORT_ALL_VARIABLES:
5
6
7 #
8 # Choose various options
9 #
10 ifeq ($(HOST),djgpp-linux)
11 NASM_FORMAT = coff
12 PREFIX = dos-
13 KERNEL_BFD_TARGET = coff-i386
14 EXE_POSTFIX =
15 CP = cp
16 endif
17
18 ifeq ($(HOST),mingw32-linux)
19 NASM_FORMAT = win32
20 PREFIX = i386-mingw32
21 KERNEL_BFD_TARGET = pe-i386
22 EXE_POSTFIX
23 CP = cp
24 endif
25
26 ifeq ($(HOST),djgpp-msdos)
27 NASM_FORMAT = coff
28 PREFIX =
29 KERNEL_BFD_TARGET = coff-go32
30 EXE_POSTFIX = .exe
31 CP = copy
32 endif
33
34 ifeq ($(HOST),mingw32-windows)
35 NASM_FORMAT = win32
36 PREFIX =
37 KERNEL_BFD_TARGET = pe-i386
38 EXE_POSTFIX = .exe
39 CP = copy
40 endif
41
42 #
43 # Create variables for all the compiler tools
44 #
45 CC = $(PREFIX)gcc
46 NATIVE_CC = gcc
47 CFLAGS = -O2 -I../../include -I../include -fno-builtin -DCHECKED_BUILD $(DEFINES) -Wall -Wstrict-prototypes
48 CXXFLAGS = $(CFLAGS)
49 NASM = nasm
50 NFLAGS = -i../include/ -f$(NASM_FORMAT)
51 LD = $(PREFIX)ld
52 NM = $(PREFIX)nm
53 OBJCOPY = $(PREFIX)objcopy
54 STRIP = $(PREFIX)strip
55 AS = $(PREFIX)gcc -c -x assembler-with-cpp
56 CPP = $(PREFIX)cpp
57
58 %.o: %.cc
59 $(CC) $(CFLAGS) -c $< -o $@
60 %.o: %.asm
61 $(NASM) $(NFLAGS) $< -o $@
62
63
64 RULES_MAK_INCLUDED = 1