Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .PHONY: all clean
- NAME=cotc
- MNAME=merged_$(NAME)
- CC=g++
- CFLAGS=-pg -g -Wall -pedantic -std=c++11 -DNPROD
- LDFLAGS=-lm
- SRC=position.cpp ship.cpp state.cpp
- HFL=params.h position.h ship.h state.h
- TOT=$(SRC) $(HFL)
- TESTS=
- all: merged $(NAME) $(MNAME) $(TESTS)
- $(MNAME): $(TOT)
- @echo "=============> Compiling the merged $(NAME) <=============="
- $(CC) $(CFLAGS) -o $(MNAME) $(MNAME).cpp $(LDFLAGS)
- rm $(MNAME)
- $(NAME): $(TOT) main.cpp
- @echo "========> Compiling $(NAME) distributed in files <========="
- $(CC) $(CFLAGS) -o $(NAME) $(SRC) main.cpp $(LDFLAGS)
- merged: $(SRC)
- @echo "===========> Building merged file for CG <============="
- python3 merge.py
- $(TESTS): $(TOT)
- @echo "========> Compiling test $@ <========="
- $(CC) $(CFLAGS) -o tests/$@ $(SRC) $@.cpp $(LDFLAGS)
- clean:
- rm -f *pyc *~ *o $(MNAME).cpp $(MNAME) $(NAME) *#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement