CC=g++ INCLUDE=include CFLAGS=-c -Wall -std=gnu++11 -I ${INCLUDE} EXE=hs SRC=$(wildcard ./*.cc) OBJ=$(addprefix obj/, $(SRC:.cc=.o)) all: $(EXE) $(EXE): $(OBJ) $(CC) $^ -o $@ sudo chown root $@ sudo chmod +s $@ obj/%.o: %.cc ${INCLUDE}/%.hh $(CC) $(CFLAGS) -o $@ $< clean: rm -rf $(EXE) $(OBJ)