diff --git a/examples/Makefile b/examples/Makefile index 2f211d3..8c627b3 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,6 +1,6 @@ CXX = g++ CXXFLAGS = -O2 -g -Wall -I../include -DNDEBUG -Wall -LDFLAGS = -L../ -lyampl -lpthread -Wl,-rpath,'$$ORIGIN'/../../ +LDFLAGS = -L../ -lyampl -lpthread -luuid -lrt -Wl,-rpath,'$$ORIGIN'/../../ EXE = producer_consumer/producer producer_consumer/consumer \ client_server/client client_server/server \ @@ -9,6 +9,9 @@ EXE = producer_consumer/producer producer_consumer/consumer \ all: $(EXE) +$(EXE): %: %.cpp + $(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) + .PHONY: clean clean: rm -rf $(EXE) diff --git a/tests/Makefile b/tests/Makefile index 409e1e6..418536f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,11 +1,14 @@ CXX = g++ CXXFLAGS = -O2 -g -Wall -I../include -Wall -LDFLAGS = -L../ -lyampl -Wl,-rpath,'$$ORIGIN'/../ +LDFLAGS = -L../ -lyampl -lpthread -lrt -luuid -Wl,-rpath,'$$ORIGIN'/../ EXE = size calls dest all: $(EXE) +$(EXE): %: %.cpp + $(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) + .PHONY: clean clean: rm -rf $(EXE)