ARCH = mips32 MODULES = runtime stream #kernel random mem timer buf elvees uart crc net regexp tcl # Maximum optimization #OPTIMIZE = -O3 -DNDEBUG # Smallest size OPTIMIZE = -Os -DNDEBUG # Debug mode, enable asserts #OPTIMIZE = -O1 -g # We use memcpy etc. with slightly different args, # so we need to use no-builtin option to prevent conflict. BINDIR = /usr/local/mipsel441/bin CC = $(BINDIR)/mipsel-elf32-gcc -mips32 -Wall -g CFLAGS = $(OPTIMIZE) -I$(OS)/sources -DMIPS32 -DELVEES_NVCOM01 -Werror \ -fno-builtin -fsigned-char -DRECURSIVE_LOCKS=0 ASFLAGS = -I$(OS)/sources -DMIPS32 -DELVEES_NVCOM01 DEPFLAGS = -MT $@ -MD -MP -MF .deps/$*.dep LDFLAGS = -nostdlib startup.o LIBS = -L$(TARGET) -luos -lgcc STARTUP = startup-mc24.S AR = $(BINDIR)/mipsel-elf32-ar SIZE = $(BINDIR)/mipsel-elf32-size OBJDUMP = $(BINDIR)/mipsel-elf32-objdump -mmips:isa32 -D OBJCOPY = $(BINDIR)/mipsel-elf32-objcopy # Make TCP segments big enough. CFLAGS += -DTCP_MSS=1460 -DTCP_SND_BUF=4096 # Required CPU frequency #CFLAGS += -DKHZ=80000 CFLAGS += -DKHZ=300000 # Frequency of installed oscillator, kHz CFLAGS += -DELVEES_CLKIN=10000 # Frequency of memory bus, kHz #CFLAGS += -DMPORT_KHZ=40000 CFLAGS += -DMPORT_KHZ=80000 # Enable FPU #CFLAGS += -DARCH_HAVE_FPU # No instructions in delay slots. CFLAGS += -fno-delayed-branch -Wa,-O0 # Enable caches #CFLAGS += -DENABLE_ICACHE #CFLAGS += -DENABLE_DCACHE ifeq (,$(findstring -DENABLE_ICACHE,$(CFLAGS))) LDFLAGS += -T code-uncached.ld # No caches ifneq (,$(findstring -DENABLE_DCACHE,$(CFLAGS))) ASFLAGS += -DENABLE_DCACHE # Data cache endif else LDFLAGS += -T code-cached.ld # Instruction cache ASFLAGS += -DENABLE_ICACHE ifneq (,$(findstring -DENABLE_DCACHE,$(CFLAGS))) ASFLAGS += -DENABLE_DCACHE # Both caches endif endif