X-Git-Url: https://git.llucax.com/software/makeit.git/blobdiff_plain/a6bdc2e5d941a688625fbcd6b3ce35e8510dcc3c..23fbed21c284d6c286f019f0d68e1e0d2c4b2906:/subproj/Build.mak?ds=sidebyside diff --git a/subproj/Build.mak b/subproj/Build.mak index 9552ae0..2d3f120 100644 --- a/subproj/Build.mak +++ b/subproj/Build.mak @@ -1,19 +1,33 @@ -# Create the include directory symlink -setup_include_dir__ := $(call symlink_include_dir,otherproj) - -# Build the shared library -$L/libotherproj.so: LINKER := $(CC) -$L/libotherproj.so: $(call find_objects,c) +# Symbolic target to add to all +.PHONY: otherproj all += otherproj -# Nice shortcut target -.PHONY: otherproj -otherproj: $L/libotherproj.so +# pkg-config specification file +otherproj-PC-PREFIX := $(prefix) +otherproj-PC-NAME := otherproj +otherproj-PC-DESC := Some other project +otherproj-PC-URL := http://www.otherproj.example.com/ +otherproj-PC-VERSION := 1.0 +otherproj-PC-LIBS := -lotherproject +otherproj-PC-CFLAGS := -DOTHERPROJ_DEFINE +otherproj-PC-VARS := PREFIX NAME DESC URL VERSION LIBS CFLAGS +$L/otherproj.pc: PC_VARS := $(otherproj-PC-VARS) +$L/otherproj.pc: $C/otherproj.pc.in $L/otherproj.pc-flags +# trigger a rebuild when flags change +setup_flags_files__ := $(call gen_rebuild_flags,$L/otherproj.pc-flags,\ + $(call varcat,$(otherproj-PC-VARS),otherproj-PC-)) +# install +$I/lib/pkgconfig/otherproj.pc: $L/otherproj.pc +install += $I/lib/pkgconfig/otherproj.pc +otherproj: $L/otherproj.pc -# Install the shared library +# Shared library +$L/libotherproj.so: LINKER := $(CC) +$L/libotherproj.so: $(call find_objects,c) $I/lib/libotherproj.so: $L/libotherproj.so install += $I/lib/libotherproj.so +otherproj: $L/libotherproj.so # Install the library's headers $I/include/otherproj/%.h: $C/%.h @@ -21,3 +35,6 @@ $I/include/otherproj/%.h: $C/%.h # XXX: we can't use += here, call will be resolved lazily if we do install := $(install) $(call find_headers,h,$I/include/otherproj) +# Create the include directory symbolic link and pkg-config flags file +setup_include_dir__ := $(call symlink_include_dir,otherproj) +