123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- PROG := libc.a
- VERSION := 0.95
- BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
- export VERSION
- DODEBUG = false
- MALLOC = malloc
- DOLFS = false
- DO_FIXME_STUFF = true
- HAS_MMU = true
- HAS_FLOATS = true
- USE_CTYPE_C_FUNCTIONS = false
- CROSS =
- CC = $(CROSS)gcc
- STRIPTOOL = $(CROSS)strip
- ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g')
- GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
- ARFLAGS=r
- CCFLAGS=$(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) -Dlinux -D__linux__ -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D__LIBC__
- ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g')
- ifeq ($(ARCH), arm)
- ARCH_CFLAGS=-fpic
- endif
- CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS)
- ifeq ($(DODEBUG),true)
- CFLAGS += -Wall -g
- LDFLAGS = -nostdlib
- else
- CFLAGS += -Wall
- LDFLAGS = -s -nostdlib
- endif
- ifndef $(PREFIX)
- PREFIX = `pwd`/_install
- endif
- ifneq ($(HAS_MMU),true)
- CFLAGS += -D__HAS_NO_MMU__
- endif
- ifneq ($(HAS_FLOATS),true)
- CFLAGS += -D__HAS_NO_FLOATS__
- endif
- ifneq ($(DO_FIXME_STUFF),true)
- CFLAGS += -DFIXME
- endif
- ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \
- -o /dev/null -xc /dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1)
- CFLAGS += -ffunction-sections -fdata-sections
- LDFLAGS += --gc-sections
- endif
|