]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/store/db/Makefile
Рефакторинг метода FILE_STORE::GetFilesList
[stg.git] / projects / stargazer / plugins / store / db / Makefile
1 SOURCES=$(wildcard *.cpp)
2
3 all: test_pg_driver pg_driver.so
4
5 test_pg_driver: test_pg_driver.o
6         $(CXX) $^ -ldl -o $@
7
8 pg_driver.so: pg_driver.o
9         $(CXX) $^ -shared -lpq -o $@
10
11 clean:
12         rm -f *.d *.o *.so test_pg_driver
13
14
15 -include $(subst .cpp,.d,$(SOURCES))
16
17 %.d: %.cpp
18         @$(CC) -MM $(CXXFLAGS) $< > $@.$$$$; \
19             sed 's,\($*\).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
20             rm -f $@.$$$$