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

51 lines
1.3 KiB

# 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
ifneq ($(wildcard local.conf),)
$(info ================================================)
$(info Overrides in `local.conf` are used.)
$(info ================================================)
endif
ifdef BUILD_CONFIG
$(info ================================================)
$(info Overrides in `$(BUILD_CONFIG)` are used.)
$(info ================================================)
endif
.PHONY: all, clean, distclean, test, install, uninstall
SOURCE=$(wildcard *.cc)
HEADERS=$(wildcard *.hh *.hxx)
OBJECTS=$(subst .cc,.o,$(SOURCE))
WITHOUT_TESTS=$(patsubst test%.o,,$(OBJECTS))
TARGET=libpEpAdapter.a
all: $(TARGET)
$(TARGET): $(WITHOUT_TESTS)
$(AR) -rc $@ $^
clean:
rm -vf $(TARGET) $(OBJECTS) *.a test_adapter test_library lib
rm -rvf test_adapter.dSYM
rm -rvf test_library.dSYM
rm -rvf .gnupg/
rm -vf .pEp_management.db*
distclean: clean
rm -Rvf .gnupg .pEp_management*
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)