8 # Choose various options
10 ifeq ($(HOST
),elf-linux
)
13 KERNEL_BFD_TARGET
= elf32-i386
18 ifeq ($(HOST
),djgpp-linux
)
21 KERNEL_BFD_TARGET
= coff-i386
27 ifeq ($(HOST
),mingw32-linux
)
29 PREFIX
= /opt
/gnu
/bin
/i386-mingw32-
30 KERNEL_BFD_TARGET
= pe-i386
33 DLLTOOL
= $(PREFIX
)dlltool
--as=$(PREFIX
)as
34 LIBGCC
= /opt
/gnu
/lib
/gcc-lib
/i386-mingw32
/2.8.0/libgcc.a
37 ifeq ($(HOST
),djgpp-msdos
)
40 KERNEL_BFD_TARGET
= coff-go32
46 ifeq ($(HOST
),mingw32-windows
)
49 KERNEL_BFD_TARGET
= pe-i386
55 # Create variables for all the compiler tools
57 ifeq ($(WITH_DEBUGGING
),yes
)
63 DEFINES
= -DDBG
-DCHECKED
65 ifeq ($(WIN32_LEAN_AND_MEAN
),yes
)
66 LEAN_AND_MEAN_DEFINE
= -DWIN32_LEAN_AND_MEAN
68 LEAN_AND_MEAN_DEFINE
=
73 CFLAGS
= -O2
-I..
/..
/..
/include -I..
/..
/include -I..
/include -fno-builtin \
74 $(LEAN_AND_MEAN_DEFINE
) $(DEFINES
) -Wall
-Wstrict-prototypes
$(DEBUGGING_CFLAGS
)
77 NFLAGS
= -i..
/..
/include/ -i..
/include/ -pinternal
/asm.inc
-f
$(NASM_FORMAT
) -d
$(NASM_FORMAT
)
80 OBJCOPY
= $(PREFIX
)objcopy
81 STRIP
= $(PREFIX
)strip
82 AS
= $(PREFIX
)gcc
-c
-x assembler-with-cpp
87 $(CC
) $(CFLAGS
) -c
$< -o
$@
89 $(NASM_CMD
) $(NFLAGS
) $< -o
$@
92 RULES_MAK_INCLUDED
= 1