diff --git a/template/Makefile b/template/Makefile index e69de29..d48482a 100644 --- a/template/Makefile +++ b/template/Makefile @@ -0,0 +1,23 @@ +NAME=$(notdir $(CURDIR)) + +CXX=clang++ +LD=clang++ +EMBB_PATH=/home/lat39910/promotion/code/embb_build +LDFLAGS=-L$(EMBB_PATH)/lib -pthread +LIBS= -lembb_dataflow_cpp -lembb_algorithms_cpp -lembb_containers_cpp -lembb_mtapi_cpp -lembb_mtapi_c -lembb_base_cpp -lembb_base_c +CXXFLAGS=-Wall -Werror -O3 -std=c++11 -g +INCLUDE=-I$(EMBB_PATH)/include +SRC=$(wildcard *.cpp) +OBJ=$(patsubst %.cpp,%.o,$(SRC)) + +.PHONY: all clean + +$(NAME): $(OBJ) + $(LD) -o $@ $(LDFLAGS) $^ $(LIBS) + +%.o: %.cpp + $(CXX) -c $(CXXFLAGS) $(INCLUDE) $^ + +clean: + rm -f $(NAME) + rm -f $(OBJ)