blob: a9e6aa388e0f6184e1837983eecfdd7c0892bdfd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
AS = as --32
LD = ld
#LDFLAGS = -m elf_i386 -x
LDFLAGS = -m elf_i386
CC = gcc
CFLAGS = -g -m32 \
-fno-builtin -fno-stack-protector \
-fomit-frame-pointer -fstrength-reduce \
-Wno-implicit-int \
-Wno-implicit-function-declaration \
-Wno-int-conversion \
-mno-sse -mno-sse2
CPP = cpp -nostdinc
AR = ar
STRIP = strip
OBJCOPY = objcopy
# we should use -fno-stack-protector with gcc 4.3
gcc_version=$(shell ls -l `which gcc` | tr '-' '\n' | tail -1)
endif
ifeq ($(UNAME), Darwin)
AS = i386-elf-as --32
LD = i386-elf-ld
#LDFLAGS = -m elf_i386 -x
LDFLAGS = -m elf_i386
CC = i386-elf-gcc-4.3.2
CFLAGS = -gdwarf-2 -g3 -m32 -fno-builtin -fno-stack-protector -fomit-frame-pointer -fstrength-reduce #-Wall
CPP = i386-elf-cpp-4.3.2 -nostdinc
AR =i386-elf-ar
STRIP = i386-elf-strip
OBJCOPY = i386-elf-objcopy
endif
|