.EXPORT_ALL_VARIABLES: ############################################################################ # # A Generic m68k config.arch that can be included by other platforms # to reduce the number of places that need to be edited when something # common changes. If you include this file you may provide: # # CPUFLAGS - cpu specific flags to pass to the compiler # VENDOR_CFLAGS - vendor specific flags to pass to the compiler # LOPT - library optimisation flags # UOPT - user optimisation flags # # David McCullough # ############################################################################ # # Generic settings # ifndef CONSOLE_BAUD_RATE CONSOLE_BAUD_RATE = 38400 endif ifeq ($(ROOTDIR)/modules,$(wildcard $(ROOTDIR)/modules)) EXTRA_MODULE_DIRS = $(ROOTDIR)/modules endif ifndef VERSIONPKG VERSIONPKG = 1.0.0 endif ifndef VERSIONSTR VERSIONSTR = $(CONFIG_VENDOR)/$(CONFIG_PRODUCT) Version $(VERSIONPKG) endif ############################################################################ # # 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 builds # # ARCH = kernel, TARGET_ARCH = uClibc MACHINE = h8300 ARCH = h8300 CROSS_COMPILE = h8300-linux-elf- CROSS = $(CROSS_COMPILE) CC = $(CROSS_COMPILE)gcc $(CPUFLAGS) AS = $(CROSS_COMPILE)as $(CPUFLAGS) CXX = $(CROSS_COMPILE)g++ $(CPUFLAGS) 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 ifeq ($(CONFIG_BINFMT_SHARED_FLAT),y) BUILD_SHARED = 1 endif # Pull in common definitions include $(ROOTDIR)/vendors/config/common/config.arch ############################################################################ # # General purpose lib building rules, uClibc.config uses these when # possible # ifdef UCLINUX_BUILD_LIB ifdef CONFIG_LIB_DEBUG CFLAGS := $(if $(LOPT),$(LOPT),-O1) else CFLAGS := $(if $(LOPT),$(LOPT),-O2) endif CFLAGS += $(CPUFLAGS) CFLAGS += $(VENDOR_CFLAGS) CFLAGS += -fno-builtin CFLAGS += -DEMBED CFLAGS += -nostdinc -I$(ROOTDIR)/include -I$(ROOTDIR)/include/include # don't want all the CFLAGS for uClibc/Config ARCH_CFLAGS = $(CFLAGS) CFLAGS += -Dlinux -D__linux__ -D__uClinux__ -Dunix ifdef CONFIG_BINFMT_SHARED_FLAT CFLAGS += -D__PIC__ -mid-shared-library endif LDFLAGS = $(CFLAGS) -Wl,-elf2flt UCLINUX_BUILD_SET=1 endif ############################################################################ # # Settings for building user apps # ifdef UCLINUX_BUILD_USER GCC_LIB = $(shell $(CC) --print-libgcc-file-name -mh -mint32) ifdef BUILD_SHARED # We use a special shared libc LIBC = -Wl,-R,$(ROOTDIR)/lib/libc.gdb $(SLIBC) endif LDPATH = -L$(ROOTDIR)/lib ifdef CONFIG_USER_DEBUG CFLAGS := $(if $(UOPT),$(UOPT),-O1) else CFLAGS := $(if $(UOPT),$(UOPT),-Os) endif CFLAGS += $(CPUFLAGS) CFLAGS += $(VENDOR_CFLAGS) CFLAGS += -fno-builtin CFLAGS += -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED ifdef CONFIG_BINFMT_SHARED_FLAT CFLAGS += -mid-shared-library -mshared-library-id=0 endif CFLAGS += -nostdinc -I$(ROOTDIR)/include -I$(ROOTDIR)/include/include CXXFLAGS = $(CFLAGS) LDFLAGS = $(CFLAGS) -Wl,-elf2flt ifdef CONFIG_BINFMT_SHARED_FLAT LDFLAGS += -Wl,-shared-lib-id,0 endif ifneq ($(LIBCDIR),libc) LDFLAGS += -nostartfiles $(ROOTDIR)/lib/crt0.o endif LDFLAGS += $(LDPATH) LDLIBS = $(LIBC) LDLIBS_static = $(SLIBC) CXXLIBS = $(LIBSTDCPP) $(LIBIOSTREAM) $(LIBIO) $(LIBIBERTY) \ $(LIBC) $(LIBGCC) ifndef FLTFLAGS FLTFLAGS := endif 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 ############################################################################