#Author : Shay Gal-On, EEMBC # #This file is part of EEMBC(R) and CoreMark(TM), which are Copyright (C) 2009 #All rights reserved. # #EEMBC CoreMark Software is a product of EEMBC and is provided under the terms of the #CoreMark License that is distributed with the official EEMBC COREMARK Software release. #If you received this EEMBC CoreMark Software without the accompanying CoreMark License, #you must discontinue use and download the official release from www.coremark.org. # #Also, if you are publicly displaying scores generated from the EEMBC CoreMark software, #make sure that you are in compliance with Run and Reporting rules specified in the accompanying readme.txt file. # #EEMBC #4354 Town Center Blvd. Suite 114-200 #El Dorado Hills, CA, 95762 # Make sure the default target is to simply build and run the benchmark. RSTAMP = v1.0 PORT_DIR=linux vpath %.c $(PORT_DIR) vpath %.h $(PORT_DIR) vpath %.mak $(PORT_DIR) include $(PORT_DIR)/core_portme.mak PREFIX = mipsel-buildroot-linux-uclibc CC = $(PREFIX)-gcc LD = $(PREFIX)-ld ifndef KERNEL_VERSION KERNEL_VERSION = 318 endif INSTALL_DIR = $(rootfs_dir)/usr/bin ITERATIONS = 1000 ifdef REBUILD FORCE_REBUILD=force_rebuild endif CFLAGS += -DITERATIONS=$(ITERATIONS) CORE_FILES = core_list_join core_main core_matrix core_state core_util ORIG_SRCS = $(addsuffix .c,$(CORE_FILES)) SRCS = $(ORIG_SRCS) $(PORT_SRCS) OBJS = $(addprefix $(OPATH),$(addsuffix $(OEXT),$(CORE_FILES)) $(PORT_OBJS)) OUTNAME = coremark$(EXE) TARGET = $(OUTNAME) OUTFILE = $(OPATH)$(OUTNAME) LOUTCMD = $(OFLAG) $(OUTFILE) $(LFLAGS_END) OUTCMD = $(OUTFLAG) $(OUTFILE) $(LFLAGS_END) HEADERS = coremark.h CHECK_FILES = $(ORIG_SRCS) $(HEADERS) $(OPATH): $(MKDIR) $(OPATH) .PHONY: compile link ifdef SEPARATE_COMPILE $(OPATH)$(PORT_DIR): $(MKDIR) $(OPATH)$(PORT_DIR) compile: $(OPATH) $(OPATH)$(PORT_DIR) $(OBJS) $(HEADERS) link: compile $(LD) $(LFLAGS) $(XLFLAGS) $(OBJS) $(LOUTCMD) else compile: $(OPATH) $(SRCS) $(HEADERS) $(CC) $(CFLAGS) $(XCFLAGS) $(SRCS) $(OUTCMD) link: compile @echo "Link performed along with compile" endif all: $(OUTFILE) $(OUTFILE): $(SRCS) $(HEADERS) Makefile-elvees core_portme.mak $(FORCE_REBUILD) $(MAKE) link clean: rm -f $(OUTFILE) $(OPATH)*.log *.info $(OPATH)index.html $(PORT_CLEAN) # rm -f $(OUTFILE) $(PORT_CLEAN) install: cp -fv $(OUTNAME) $(INSTALL_DIR)/ uninstall: rm -f $(INSTALL_DIR)/$(OUTNAME) .PHONY: all clean install uninstall