Source

cpp-sandbox / Makefile

Full commit
SRC = \
	src/main.cpp \
	src/object.cpp \
	src/line.cpp

HEADERS = \
	src/object.h \
	src/line.h \
	src/point.h

OBJ = ${SRC:.cpp=.o}
CC = g++
CFLAGS = -Wall -g
EXECUTABLE = bin/app

all: app

${OBJ}: ${HEADERS}

${EXECUTABLE}: ${OBJ}
	${CC} ${CFLAGS} ${OBJ} -o ${EXECUTABLE}

$.o: $.cpp
	${CC} ${CFLAGS} -c -o $@ $<

app: ${EXECUTABLE} ${HEADERS}

.PHONY: all app