mingw: add minimal pkg-config support
This commit is contained in:
parent
78823d762e
commit
30630daa22
|
@ -52,6 +52,14 @@ endif
|
|||
endif
|
||||
DISTFILE:=$(shell echo "miniupnpc-bin-win32-`cat VERSION`-$(COMMITREF).zip")
|
||||
|
||||
LIBDIR ?= lib
|
||||
# install directories
|
||||
ifeq ($(strip $(PREFIX)),)
|
||||
INSTALLPREFIX ?= /usr
|
||||
else
|
||||
INSTALLPREFIX ?= $(PREFIX)
|
||||
endif
|
||||
|
||||
.PHONY: all dist clean
|
||||
|
||||
all: $(BINARIES)
|
||||
|
@ -125,6 +133,19 @@ rc_version.h: VERSION
|
|||
mv $@.tmp $@
|
||||
endif
|
||||
|
||||
miniupnpc.pc: VERSION
|
||||
$(RM) $@
|
||||
echo "prefix=$(INSTALLPREFIX)" >> $@
|
||||
echo "exec_prefix=\$${prefix}" >> $@
|
||||
echo "libdir=\$${exec_prefix}/$(LIBDIR)" >> $@
|
||||
echo "includedir=\$${prefix}/include" >> $@
|
||||
echo "" >> $@
|
||||
echo "Name: miniUPnPc" >> $@
|
||||
echo "Description: UPnP IGD client lightweight library" >> $@
|
||||
echo "Version: $(shell cat VERSION)" >> $@
|
||||
echo "Libs: -L\$${libdir} -lminiupnpc" >> $@
|
||||
echo "Cflags: -I\$${includedir}" >> $@
|
||||
|
||||
winres.o: miniupnpc.rc rc_version.h
|
||||
$(WINDRES) -D INTERNAL_NAME=\\\"miniupnpc.dll\\0\\\" -i $< -o $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue