diff options
author | Jason Reiss <jreiss@multitech.com> | 2019-10-01 14:16:27 -0500 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-05-20 19:50:21 +0300 |
commit | 8decc63b8b82e49113bc0a9939487dabbeaf3513 (patch) | |
tree | ca6b46a7546fcee8c80fbacfe8689b861877aa66 /recipes-connectivity/lora | |
parent | 3ada7995d9654f5e43858e6bd25fba917b1d8f03 (diff) | |
download | meta-mlinux-8decc63b8b82e49113bc0a9939487dabbeaf3513.tar.gz meta-mlinux-8decc63b8b82e49113bc0a9939487dabbeaf3513.tar.bz2 meta-mlinux-8decc63b8b82e49113bc0a9939487dabbeaf3513.zip |
change jsoncpp recipe/makefile to build shared library
Diffstat (limited to 'recipes-connectivity/lora')
-rw-r--r-- | recipes-connectivity/lora/lora-query/Makefile | 75 | ||||
-rw-r--r-- | recipes-connectivity/lora/lora-query_1.0.4.bb | 1 |
2 files changed, 76 insertions, 0 deletions
diff --git a/recipes-connectivity/lora/lora-query/Makefile b/recipes-connectivity/lora/lora-query/Makefile new file mode 100644 index 0000000..2079a0d --- /dev/null +++ b/recipes-connectivity/lora/lora-query/Makefile @@ -0,0 +1,75 @@ + +includedir ?= /usr/include +libdir ?= /usr/lib + +CFLAGS += + +LIBS := -lmts -ljsoncpp -lpthread + +OBJS += \ +Version.o \ +main.o + +CPP_DEPS += \ +Version.d \ +main.d + + +all: postbuild + +prebuild: + @echo PRE-BUILD + @echo 'Removing previous version components started' + -$(RM) Version.o + -$(RM) Version.d + -$(RM) Version.cpp + @echo 'Removing previous version components complete' + @echo ' ' + +postbuild: mainbuild + @echo POST-BUILD + @echo ' ' + +mainbuild: prebuild + @echo MAIN-BUILD + @$(MAKE) --no-print-directory target + +target: $(OBJS) + @echo 'Building target: $@' + $(CXX) $(CFLAGS) $(LDFLAGS) -o lora-query $(OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +Version.o: Version.cpp + @echo 'Building file: $<' + $(CXX) $(CFLAGS) -Iinclude -Wall -c -std=c++0x -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + +Version.cpp: + @echo 'Creating file: Version.cpp' + /bin/echo -e "//Pre-Build Auto-Generated Source\n#include \"Version.h\"\n\nconst std::string Version::version(\"$(shell git describe)\");" > Version.cpp + @echo 'Finished creating: Version.cpp' + @echo ' ' + +main.o: main.cpp + @echo 'Building file: $<' + $(CXX) $(CFLAGS) -I=$(includedir)/jsoncpp -Wall -c -std=c++0x -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + +install: + install -d $(DESTDIR)/usr/bin + install -m 0755 lora-query $(DESTDIR)/usr/bin + +strip: + $(STRIP) lora-query + +clean: + -$(RM) $(OBJS) $(CPP_DEPS) lora-query + -@echo ' ' + +.PHONY: all clean dependents install strip target +.SECONDARY: + + diff --git a/recipes-connectivity/lora/lora-query_1.0.4.bb b/recipes-connectivity/lora/lora-query_1.0.4.bb index 7f2b4b0..60bcc42 100644 --- a/recipes-connectivity/lora/lora-query_1.0.4.bb +++ b/recipes-connectivity/lora/lora-query_1.0.4.bb @@ -3,6 +3,7 @@ HOMEPAGE = "http://www.multitech.net/" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "jsoncpp libmts" +RDEPENDS_${PN} += "jsoncpp" PR = "r2" SRCREV = "${PV}" |