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