.EXPORT_ALL_VARIABLES: ############################################################################ # # Vendor specific settings # CONSOLE_BAUD_RATE = 9600 ############################################################################ # # The makefiles need to know how to do things in different contexts # To save some pain we put it all here # # First settings we always want for all build # # ARCH = kernel, TARGET_ARCH = uClibc MACHINE = arm ARCH = armnommu CROSS_COMPILE = arm-elf- CROSS = $(CROSS_COMPILE) CC = $(CROSS_COMPILE)gcc AS = $(CROSS_COMPILE)as CXX = $(CROSS_COMPILE)g++ AR = $(CROSS_COMPILE)ar LD = $(CROSS_COMPILE)ld OBJCOPY = $(CROSS_COMPILE)objcopy RANLIB = $(CROSS_COMPILE)ranlib ELF2FLT = elf2flt STRIPTOOL = $(CROSS_COMPILE)strip STRIP = $(STRIPTOOL) UCLINUX_BUILD_SET = 0 # have we set a special config below ############################################################################ # # General purpose lib building rules, uClibc.config uses these when # possible # ifdef UCLINUX_BUILD_LIB ifdef CONFIG_LIB_DEBUG CFLAGS := -O1 -g else CFLAGS := -O2 -g endif CFLAGS += $(VENDOR_CFLAGS) CFLAGS += -fno-builtin CFLAGS += -DEMBED # don't want all the CFLAGS for uClibc/Config ARCH_CFLAGS = $(CFLAGS) CFLAGS += -I$(ROOTDIR)/lib/$(CONFIG_LIBCDIR)/include -I$(ROOTDIR) CFLAGS += -Dlinux -D__linux__ -D__uClinux__ -Dunix # the following is needed for uClinux-2.4 CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/include LDFLAGS = $(CFLAGS) -Wl,-elf2flt UCLINUX_BUILD_SET=1 endif ############################################################################ # # Settings for building user apps # ifdef UCLINUX_BUILD_USER GCC_DIR = $(shell $(CC) -v 2>&1|grep specs|sed -e 's/.* \(.*\)specs/\1\./') GCC_LIB = /usr/local/arm-elf/lib LIBC = -lc LIBM = -lm LIBNET = -lnet LIBDES = -ldes LIBPCAP = -lpcap LIBSSL = -lssl LIBCRYPTO = -lcrypto LIBCRYPT = -lcrypt LIBGCC = -lgcc LIBIBERTY = -liberty LIBIO = -lio LIBIOSTREAM = -liostream LIBSTDCPP = -lstdc++ LDPATH = \ -L$(ROOTDIR)/lib/$(LIBCDIR)/. \ -L$(ROOTDIR)/lib/$(LIBCDIR)/lib \ -L$(ROOTDIR)/lib/libm \ -L$(ROOTDIR)/lib/libnet \ -L$(ROOTDIR)/lib/libdes \ -L$(ROOTDIR)/lib/libpcap \ -L$(ROOTDIR)/lib/libssl INCLIBC = -I$(ROOTDIR)/lib/$(CONFIG_LIBCDIR)/include INCLIBM = -I$(ROOTDIR)/lib/libm INCNET = -I$(ROOTDIR)/lib/libnet INCDES = -I$(ROOTDIR)/freeswan/libdes INCGMP = -I$(ROOTDIR)/lib/libgmp INCPCAP = -I$(ROOTDIR)/lib/libpcap INCSSL = -I$(ROOTDIR)/lib/libssl/include INCVEND = -I$(ROOTDIR)/vendors/include ifdef CONFIG_USER_DEBUG CFLAGS := -O1 -g else CFLAGS := -Os endif CFLAGS += $(VENDOR_CFLAGS) CFLAGS += -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED CFLAGS += $(INCLIBC) $(INCLIBM) CFLAGS += -I$(ROOTDIR) CFLAGS += -fno-builtin CFLAGS += -nostartfiles CFLAGS += # # the following is needed for 2.4 # CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/include CXXFLAGS = $(CFLAGS) $(INCCXX) -fname-mangling-version-0 LDFLAGS = $(CFLAGS) -Wl,-elf2flt $(ROOTDIR)/lib/libc/crt0.o LDLIBS = $(LDPATH) $(LIBC) CXXLIBS = $(LDPATH) $(LIBSTDCPP) $(LIBIOSTREAM) $(LIBIO) $(LIBIBERTY) \ $(LIBC) $(LIBGCC) FLTFLAGS := export FLTFLAGS # for anyone still using it CONVERT = /bin/true UCLINUX_BUILD_SET=1 endif ############################################################################ # # fall through, do other config options perhaps # ifeq ($(UCLINUX_BUILD_SET),1) endif ############################################################################