diff options
Diffstat (limited to 'src/Makefile.header')
-rw-r--r-- | src/Makefile.header | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Makefile.header b/src/Makefile.header new file mode 100644 index 0000000..a9e6aa3 --- /dev/null +++ b/src/Makefile.header | |||
@@ -0,0 +1,41 @@ | |||
1 | UNAME := $(shell uname) | ||
2 | |||
3 | ifeq ($(UNAME), Linux) | ||
4 | AS = as --32 | ||
5 | LD = ld | ||
6 | #LDFLAGS = -m elf_i386 -x | ||
7 | LDFLAGS = -m elf_i386 | ||
8 | CC = gcc | ||
9 | CFLAGS = -g -m32 \ | ||
10 | -fno-builtin -fno-stack-protector \ | ||
11 | -fomit-frame-pointer -fstrength-reduce \ | ||
12 | -Wno-implicit-int \ | ||
13 | -Wno-implicit-function-declaration \ | ||
14 | -Wno-int-conversion \ | ||
15 | -mno-sse -mno-sse2 | ||
16 | |||
17 | CPP = cpp -nostdinc | ||
18 | AR = ar | ||
19 | STRIP = strip | ||
20 | OBJCOPY = objcopy | ||
21 | # we should use -fno-stack-protector with gcc 4.3 | ||
22 | gcc_version=$(shell ls -l `which gcc` | tr '-' '\n' | tail -1) | ||
23 | endif | ||
24 | |||
25 | |||
26 | |||
27 | ifeq ($(UNAME), Darwin) | ||
28 | AS = i386-elf-as --32 | ||
29 | LD = i386-elf-ld | ||
30 | #LDFLAGS = -m elf_i386 -x | ||
31 | LDFLAGS = -m elf_i386 | ||
32 | CC = i386-elf-gcc-4.3.2 | ||
33 | CFLAGS = -gdwarf-2 -g3 -m32 -fno-builtin -fno-stack-protector -fomit-frame-pointer -fstrength-reduce #-Wall | ||
34 | |||
35 | CPP = i386-elf-cpp-4.3.2 -nostdinc | ||
36 | AR =i386-elf-ar | ||
37 | STRIP = i386-elf-strip | ||
38 | OBJCOPY = i386-elf-objcopy | ||
39 | endif | ||
40 | |||
41 | |||