forked from pEp.foundation/libpEpAdapter
LIB-13: Standard project layout (src dir added)
parent
84eccb382a
commit
ef5bc0a7c0
@ -0,0 +1,37 @@
|
||||
# Copyright 2018, pEp Foundation
|
||||
# This file is part of lib pEp Adapter
|
||||
# This file may be used under the terms of the GNU General Public License version 3
|
||||
# see LICENSE.txt
|
||||
|
||||
include ../Makefile.conf
|
||||
|
||||
SOURCE=$(wildcard *.cc)
|
||||
HEADERS=$(wildcard *.hh *.hxx)
|
||||
OBJECTS=$(subst .cc,.o,$(SOURCE))
|
||||
DEPENDS=$(subst .cc,.d,$(SOURCE))
|
||||
CXXFLAGS+= -MMD -MP
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include $(DEPENDS)
|
||||
endif
|
||||
|
||||
.PHONY: install uninstall clean
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(AR) -rc $@ $^
|
||||
|
||||
clean:
|
||||
rm -vf $(TARGET) $(OBJECTS) $(DEPENDS)
|
||||
rm -f *.d.*
|
||||
|
||||
install: $(TARGET)
|
||||
mkdir -p $(PREFIX)/include/pEp
|
||||
mkdir -p $(PREFIX)/lib
|
||||
cp -v $(HEADERS) $(PREFIX)/include/pEp/
|
||||
cp -v $(TARGET) $(PREFIX)/lib/
|
||||
|
||||
uninstall:
|
||||
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
|
||||
cd $(PREFIX)/lib && rm -vf $(TARGET)
|
Loading…
Reference in New Issue