You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libpEpAdapter/Makefile

48 lines
899 B
Makefile

# 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
5 years ago
# see LICENSE.txt
5 years ago
include Makefile.conf
TARGET=libpEpAdapter.a
.PHONY: install uninstall clean
5 years ago
SOURCE=$(wildcard *.cc)
5 years ago
HEADERS=$(wildcard *.hh *.hxx)
5 years ago
OBJECTS=$(subst .cc,.o,$(SOURCE))
DEPENDS=$(subst .cc,.d,$(SOURCE))
CXXFLAGS+= -MMD -MP
all: $(TARGET)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPENDS)
endif
5 years ago
lib: $(TARGET)
all: lib
test: lib
3 years ago
$(MAKE) -C test
5 years ago
$(TARGET): $(OBJECTS)
$(AR) -rc $@ $^
5 years ago
clean:
rm -vf $(TARGET) $(OBJECTS) $(DEPENDS)
3 years ago
rm -f *.d.*
$(MAKE) -C test clean
5 years ago
5 years ago
install: $(TARGET)
mkdir -p $(PREFIX)/include/pEp
mkdir -p $(PREFIX)/lib
cp -v $(HEADERS) $(PREFIX)/include/pEp/
cp -v $(TARGET) $(PREFIX)/lib/
5 years ago
5 years ago
uninstall:
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
cd $(PREFIX)/lib && rm -vf $(TARGET)