Makefile 675 B

1234567891011121314151617181920212223242526272829303132
  1. CC = g++
  2. DEBUG = -g
  3. CFLAGS = -Iinclude -I../op_utility/include -Wall $(DEBUG)
  4. #For GPS enabled conversion !
  5. #LFLAGS = -Lbin -Llibs -lutilityh -lproj $(DEBUG) -std=c++11
  6. LFLAGS = -L../op_utility/libs -Llibs -lutility $(DEBUG) -std=c++11
  7. SRC = $(wildcard src/*.cpp)
  8. BIN = $(wildcard bin/*.o)
  9. INCLUDES = $(wildcard include/*.h)
  10. OBJ = $(SRC:.cpp=.o)
  11. LIB = libs/libplanner.so
  12. all: $(LIB) post-build
  13. pre-build:
  14. -@echo ./src/$(OBJ)
  15. $(LIB): $(OBJ)
  16. $(CC) -o $(LIB) src/*.o $(LFLAGS) -shared
  17. src/%.o: src/%.cpp
  18. $(CC) -o $@ -c $< $(CFLAGS) -fPIC
  19. # mv src/*.o ./bin/
  20. post-build:
  21. cp $(LIB) ../op_simu/libs/
  22. .PHONY: clean
  23. clean:
  24. rm -rf src/*.o *.o libs/libplanner.so