From: Michel Pollet Date: Tue, 14 Oct 2014 17:44:24 +0000 (+0100) Subject: build: re-accelerated the build X-Git-Tag: v1.3~66 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=b5cdf931f2305dbddc4008879f81e1a3cb4c74ed;p=sx%2Fsimavr.git build: re-accelerated the build Simavr used to build pretty quick, and it's been crawling for a while now, turns out some of the enhancements we added to the SIMAVR path detection were being evaluated a LOT. So went to the makefile and made sure most of the static variables are evaluated once only. Signed-off-by: Michel Pollet --- diff --git a/Makefile.common b/Makefile.common index dbafa0b..42c7004 100644 --- a/Makefile.common +++ b/Makefile.common @@ -27,7 +27,7 @@ # along with simavr. If not, see . # simavr directory -SIMAVR ?= ${shell for p in . .. ../.. ../../..;do test -d $$p/simavr/sim && echo $$p/simavr; done} +SIMAVR := ${shell for p in . .. ../.. ../../..;do test -d $$p/simavr/sim && echo $$p/simavr; done} # You can override the build settings with local changes in this file # for example: @@ -37,7 +37,7 @@ SIMAVR ?= ${shell for p in . .. ../.. ../../..;do test -d $$p/simavr/sim && ech -include ${wildcard ${SIMAVR}/../.make.options*} # get the first character of what the compiler says it is, unless it's 'x86_64' doh -ARCH = ${shell $(CC) -dumpmachine | sed -e 's/^x/i/' -e 's/\(.\).*/\1/'} +ARCH := ${shell $(CC) -dumpmachine | sed -e 's/^x/i/' -e 's/\(.\).*/\1/'} CFLAGS += -O2 -Wall CFLAGS += -g @@ -91,8 +91,8 @@ MKDIR ?= mkdir -p INSTALL ?= install SHELL := ${shell which bash} -OBJ = obj-${shell $(CC) -dumpmachine} -LIBDIR = ${shell pwd}/${SIMAVR}/${OBJ} +OBJ := obj-${shell $(CC) -dumpmachine} +LIBDIR := ${shell pwd}/${SIMAVR}/${OBJ} LDFLAGS += -L${LIBDIR} -lsimavr LDFLAGS += -lelf diff --git a/examples/Makefile.opengl b/examples/Makefile.opengl index 158be54..acd89f9 100644 --- a/examples/Makefile.opengl +++ b/examples/Makefile.opengl @@ -1,5 +1,5 @@ -UNAME = ${shell uname} +UNAME := ${shell uname} ifeq (${UNAME}, Darwin) LDFLAGS += -framework GLUT -framework OpenGL diff --git a/tests/Makefile b/tests/Makefile index cff14f3..3232c8b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -26,8 +26,8 @@ simavr = .. IPATH += ${simavr}/include IPATH += ${simavr}/simavr/sim -tests_src = ${wildcard test_*.c} -tests = ${patsubst %.c, ${OBJ}/%.tst, ${tests_src}} +tests_src := ${wildcard test_*.c} +tests := ${patsubst %.c, ${OBJ}/%.tst, ${tests_src}} all: obj axf tests