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

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


# Regeln
all: test1 test2 test3

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

sizes: all
	@echo
	@size test?

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

.PHONY: clean 

