generate pkg-config files
This commit is contained in:
@@ -23,5 +23,48 @@ CONFIGS += $(subst ../,,$(wildcard ../os/CONFIG*))
|
||||
CONFIGS += $(subst ../,,$(wildcard ../RELEASE*))
|
||||
CONFIGS += $(subst ../,,$(wildcard ../RULES*))
|
||||
|
||||
ifdef T_A
|
||||
ifeq ($(BUILD_CLASS)$(POSIX),HOSTYES)
|
||||
|
||||
FINAL_LOCATION ?= $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LOCATION))
|
||||
|
||||
INSTALL_PC ?= $(INSTALL_LOCATION)/lib/pkgconfig
|
||||
|
||||
DIRECTORY_TARGETS += $(INSTALL_PC)
|
||||
|
||||
C_CFLAGS += $(filter-out -g,$(filter-out -O%,$(filter-out -W%,$(CPPFLAGS))))
|
||||
C_CFLAGS += $(filter-out -g,$(filter-out -O%,$(filter-out -W%,$(CFLAGS))))
|
||||
|
||||
MVARS += FINAL_LOCATION OS_CLASS CMPLR_CLASS C_CFLAGS LDFLAGS LDLIBS
|
||||
MVARS += EPICS_VERSION EPICS_REVISION EPICS_MODIFICATION EPICS_MODIFICATION
|
||||
|
||||
EXPANDFLAGS += $(foreach var,$(MVARS),-D$(var)="$(strip $($(var)))")
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ifdef T_A
|
||||
ifeq ($(BUILD_CLASS)$(POSIX),HOSTYES)
|
||||
|
||||
epics-base-$(T_A).pc: ../epics-base-arch.pc.in
|
||||
epics-base.pc: ../epics-base.pc.in
|
||||
|
||||
epics-base-$(T_A).pc epics-base.pc:
|
||||
$(ECHO) "Expanding $< to $@"
|
||||
@$(RM) $@
|
||||
@$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
|
||||
$(INSTALL_PC)/%: %
|
||||
$(ECHO) "Installing pkgconfig file $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
buildInstall: $(INSTALL_PC)/epics-base-$(T_A).pc
|
||||
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
buildInstall: $(INSTALL_PC)/epics-base.pc
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
24
configure/epics-base-arch.pc.in
Normal file
24
configure/epics-base-arch.pc.in
Normal file
@@ -0,0 +1,24 @@
|
||||
# non-standard variables
|
||||
top=@FINAL_LOCATION@
|
||||
arch=@ARCH@
|
||||
os_class=@OS_CLASS@
|
||||
cmplr_class=@CMPLR_CLASS@
|
||||
|
||||
includedir_osi=${top}/include
|
||||
includedir_osd=${top}/include/os/@OS_CLASS@
|
||||
includedir_comp=${top}/include/compiler/@CMPLR_CLASS@
|
||||
|
||||
includedirs=${includedir_osi} ${includedir_osd} ${includedir_comp}
|
||||
|
||||
# standard variables
|
||||
prefix=@FINAL_LOCATION@
|
||||
exec_prefix=@FINAL_LOCATION@
|
||||
bindir=${top}/bin/@ARCH@
|
||||
libdir=${top}/lib/@ARCH@
|
||||
|
||||
Name: epics-base-@ARCH@
|
||||
Version: @EPICS_VERSION@.@EPICS_REVISION@.@EPICS_MODIFICATION@.@EPICS_MODIFICATION@
|
||||
Description: EPICS Base for @ARCH@
|
||||
Cflags: -I${includedir_osi} -I${includedir_osd} -I${includedir_comp} @C_CFLAGS@
|
||||
Libs: -L${libdir} @LDFLAGS@
|
||||
Libs.private: @LDLIBS@
|
||||
22
configure/epics-base.pc.in
Normal file
22
configure/epics-base.pc.in
Normal file
@@ -0,0 +1,22 @@
|
||||
# non-standard variables
|
||||
top=@FINAL_LOCATION@
|
||||
arch=@ARCH@
|
||||
os_class=@OS_CLASS@
|
||||
cmplr_class=@CMPLR_CLASS@
|
||||
|
||||
includedir_osi=${top}/include
|
||||
includedir_osd=${top}/include/os/@OS_CLASS@
|
||||
includedir_comp=${top}/include/os/@CMPLR_CLASS@
|
||||
|
||||
includedirs=${includedir_osi} ${includedir_osd} ${includedir_comp}
|
||||
|
||||
# standard variables
|
||||
prefix=@FINAL_LOCATION@
|
||||
exec_prefix=@FINAL_LOCATION@
|
||||
bindir=${top}/bin/@ARCH@
|
||||
libdir=${top}/lib/@ARCH@
|
||||
|
||||
Name: epics-base
|
||||
Version: @EPICS_VERSION@.@EPICS_REVISION@.@EPICS_MODIFICATION@.@EPICS_MODIFICATION@
|
||||
Description: EPICS Base for the host arch
|
||||
Requires: epics-base-@ARCH@ = @EPICS_VERSION@.@EPICS_REVISION@.@EPICS_MODIFICATION@.@EPICS_MODIFICATION@
|
||||
Reference in New Issue
Block a user