123456789101112131415161718192021222324252627 |
- SHELL := /bin/bash
- CXX=g++
- CXXFLAGS=
- LDFLAGS=-lSDL
- INC=
- LIB=
- EXEC=pongcircle
- SRC=$(shell find . -name '*.cpp')
- OBJ=$(SRC:.cpp=.o)
- $(EXEC): $(OBJ)
- @mkdir -p bin
- @$(CXX) -o bin/$@ $^ $(LDFLAGS) $(LIB)
- #TODO add .h in case off global variables
- %.o : %.cpp
- @$(CXX) -o $@ -c $< $(CXXFLAGS) $(INC)
- clean:
- @rm -rf $(OBJ)
- distclean: clean
- @rm -rf $(EXEC)
- exec: $(EXEC)
- @./bin/$(EXEC)
|