CXX_FLAGS ?= -fno-exceptions -fno-rtti -Os -static -ffunction-sections -fno-use-cxa-atexit -nostartfiles -I src --include config.h -g
CXX := g++ 

HDR := $(wildcard src/*.h)
SRC := $(wildcard src/*.cc)
OBJ := $(SRC:%.cc=%.o)

all: test1 test2 test3

test% : test%.cc $(SRC) $(HDR) config.h
	$(CXX) $(CXX_FLAGS) -D $@_build -Wl,-T -Wl,sections -Wl,--gc-sections -o $@ $< $(SRC)  

size: all
	@./ose.sizes.pl

clean:
	@rm -f $(OBJ) test?.o test?

.PHONY: clean 
