1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
CPP=g++ WARN=-W -Wall CFLAGS=-O2 ${WARN} LDFLAGS=-los EXE=calculator.app OBJS=calculator.o all: ${OBJS} ${CPP} ${LDFLAGS} ${OBJS} -o ${EXE} %.o: %.cpp ${CPP} ${CFLAGS} -c -o $@ $< clean: rm ${OBJS} ${EXE}