.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 = sparc ARCH = sparcnommu CROSS_COMPILE = sparc-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 -fomit-frame-pointer endif CFLAGS += $(VENDOR_CFLAGS) CFLAGS += -fno-builtin #CFLAGS += -msep-data -DEMBED 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,-d -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/sparc-elf/lib SLIBC = -lc SLIBM = -lm SLIBNET = -lnet SLIBDES = -ldes SLIBAES = -laes SLIBPCAP = -lpcap SLIBSSL = -lssl SLIBCRYPTO = -lcrypto LIBC = $(SLIBC) LIBM = $(SLIBM) LIBNET = $(SLIBNET) LIBDES = $(SLIBDES) LIBAES = $(SLIBAES) LIBPCAP = $(SLIBPCAP) LIBSSL = $(SLIBSSL) LIBCRYPTO = $(SLIBCRYPTO) 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/libaes \ -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 INCAES = -I$(ROOTDIR)/freeswan/libcrypto/libaes 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 -g -fomit-frame-pointer endif CFLAGS += $(VENDOR_CFLAGS) CFLAGS += -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED CFLAGS += $(INCLIBC) $(INCLIBM) CFLAGS += -I$(ROOTDIR) CFLAGS += -fno-builtin CFLAGS += -mv8 #CFLAGS += -msep-data # # the following is needed for 2.4 # CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/include CXXFLAGS = $(CFLAGS) $(INCCXX) -fname-mangling-version-0 LDFLAGS = $(CFLAGS) -Wl,-d -Wl,-elf2flt 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 ############################################################################