12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- include $(TOPDIR)Config
- GCCINCDIR = $(shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
- ifndef OPTIMIZATION
- OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
- then echo "-Os"; else echo "-O2" ; fi)
- endif
- ARFLAGS=r
- CCFLAGS=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) -Dlinux -D__linux__ -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D__LIBC__
- CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
- ifeq ($(strip $(DODEBUG)),true)
- CFLAGS += -g
- LDFLAGS = -nostdlib -Wl,-warn-common
- STRIPTOOL = /bin/true -Since_we_are_debugging
- else
- CFLAGS += -DNDEBUG
- LDFLAGS = -s -nostdlib -Wl,-warn-common
- endif
- ifndef $(PREFIX)
- PREFIX = `pwd`/_install
- endif
- ifneq ($(strip $(HAS_MMU)),true)
- CFLAGS += -D__HAS_NO_MMU__
- endif
- ifneq ($(strip $(HAS_FLOATS)),true)
- CFLAGS += -D__HAS_NO_FLOATS__
- endif
- ifeq ($(strip $(TARGET_ARCH)),m68k)
- CFLAGS += -D__VFORK_MACRO__ -Dconst= -D__const= -D__extension__=
- endif
- ifeq ($(strip $(TARGET_ARCH)),sh)
- CFLAGS += -DNO_UNDERSCORES
- endif
- NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/')
|