-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile.inc
47 lines (32 loc) · 1.14 KB
/
Makefile.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
LIBS := -llunaservice -lmojoluna -lmojodb -lmojocore -lpmloglib $(LIBS)
LOCAL_LDFLAGS := $(LDFLAGS) $(LIBS)
GLIBCURL_SOURCES := glibcurl.c
CONFIGURATOR_SOURCES := \
Log.cpp
ActivityConfigurator.cpp \
Configurator.cpp \
DbKindConfigurator.cpp \
DbPermissionsConfigurator.cpp \
FileCacheConfigurator.cpp
CONFIGURATOR_MAIN := BusClient.cpp
SOURCE_DIRS := src
CONFIGURATOR_TARGET := $(OBJDIR)/configurator
CONFIGURATOR_OBJECTS := $(CONFIGURATOR_SOURCES:%.cpp=$(OBJDIR)/%.o)
CONFIGURATOR_OBJECTS_MAIN := $(CONFIGURATOR_MAIN:%.cpp=$(OBJDIR)/%.o)
all: setup $(CONFIGURATOR_TARGET)
$(CONFIGURATOR_TARGET): $(CONFIGURATOR_OBJECTS) $(CONFIGURATOR_OBJECTS_MAIN)
$(CXX) -o $(CONFIGURATOR_TARGET) $(CONFIGURATOR_OBJECTS) $(CONFIGURATOR_OBJECTS_MAIN) $(LOCAL_LDFLAGS)
$(OBJDIR)/%.o: %.cpp
$(CXX) -MMD $(INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_CPPFLAGS) -c $< -o $@
setup: $(OBJDIR)
$(OBJDIR):
@mkdir -p $(OBJDIR)
vpath %.cpp $(SOURCE_DIRS)
vpath %.c $(SOURCE_DIRS)
docs:
(cd docs && doxygen ./Doxyfile)
clean:
rm -rf $(OBJDIR)
SOURCES := $(CONFIGURATOR_SOURCES) $(CONFIGURATOR_MAIN)
-include $(SOURCES:%.cpp=$(OBJDIR)/%.d)
.PHONY: clean all setup