Browse Source

Build: Add make target install/uninstall

makefile-conf
heck 3 months ago
parent
commit
c82e07c7cf
2 changed files with 18 additions and 19 deletions
  1. +5
    -10
      Makefile.conf
  2. +13
    -9
      src/Makefile

src/Makefile.conf → Makefile.conf View File


+ 13
- 9
src/Makefile View File

@ -1,15 +1,11 @@
include Makefile.conf
ifneq ($(wildcard local.conf),)
$(info ================================================)
$(info Overrides in `local.conf` are used.)
$(info ================================================)
endif
include ../Makefile.conf
TARGET=transport_status_code.h transport_status_code.c PEPTransportStatusCode.h TransportStatusCode.kt
HEADERS=$(wildcard *.hh *.hxx *.h)
TSC=$(wildcard *.tsc)
.PHONY: install uninstall clean
all: $(TARGET)
transport_status_code.h: gen_c.ysl2 transport_status_code.yml2 $(TSC)
@ -24,7 +20,15 @@ PEPTransportStatusCode.h: gen_objc.ysl2 transport_status_code.yml2 $(TSC)
TransportStatusCode.kt: gen_kotlin.ysl2 transport_status_code.yml2 $(TSC)
$(YML2_PROC) -y $< -o $@ transport_status_code.yml2
.PHONY: clean
install: $(TARGET)
mkdir -p $(PREFIX)/include/pEp
mkdir -p $(PREFIX)/lib
cp -v $(HEADERS) $(PREFIX)/include/pEp/
uninstall:
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
cd $(PREFIX)/lib && rm -vf $(TARGET)
clean:
rm -f $(TARGET)

Loading…
Cancel
Save