blob: fe17e983fda2fac9b3fccc3c708e40457aa71050 (
plain)
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
|
include common.mk
PROJECTNAME=libreichwein
CXXFLAGS+= -fvisibility=hidden -fPIC
PROGSRC=\
file.cpp \
mime.cpp \
stringutil.cpp \
tempfile.cpp \
url.cpp
SRC=$(PROGSRC)
HEADERS=$(PROGSRC:.cpp=.h)
all: $(PROJECTNAME).a
install:
mkdir -p $(DESTDIR)/usr/lib
cp $(PROJECTNAME).a $(DESTDIR)/usr/lib/
mkdir -p $(DESTDIR)/usr/include/libreichwein
cp $(HEADERS) $(DESTDIR)/usr/include/libreichwein/
$(PROJECTNAME).a: $(SRC:.cpp=.o)
ar rcs $@ $^
%.d: %.cpp
$(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
$(CXX) $(CXXFLAGS) -c $< -o $@
# dependencies
ADD_DEP=Makefile
# misc ---------------------------------------------------
clean:
-rm -f *.o *.a *.d
.PHONY: clean all install
-include $(wildcard $(SRC:.cpp=.d))
|