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-support/multitech | |
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-support/multitech')
-rw-r--r-- | recipes-support/multitech/jsparser/Makefile | 69 | ||||
-rw-r--r-- | recipes-support/multitech/jsparser_0.3.bb | 2 | ||||
-rw-r--r-- | recipes-support/multitech/libmts-io/Makefile | 73 | ||||
-rw-r--r-- | recipes-support/multitech/radio-cmd_0.4.bb | 2 | ||||
-rw-r--r-- | recipes-support/multitech/radio-query_0.7.bb | 2 |
5 files changed, 145 insertions, 3 deletions
diff --git a/recipes-support/multitech/jsparser/Makefile b/recipes-support/multitech/jsparser/Makefile new file mode 100644 index 0000000..8fe64f6 --- /dev/null +++ b/recipes-support/multitech/jsparser/Makefile @@ -0,0 +1,69 @@ + +includedir ?= /usr/include +libdir ?= /usr/lib + +LIBS := -lmts -ljsoncpp -lrt + +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 jsparser $(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 jsparser $(DESTDIR)/usr/bin + +clean: + -$(RM) $(OBJS) $(CPP_DEPS) jsparser + -@echo ' ' + +.PHONY: all clean dependents install target +.SECONDARY: + + diff --git a/recipes-support/multitech/jsparser_0.3.bb b/recipes-support/multitech/jsparser_0.3.bb index c289d30..cd419c6 100644 --- a/recipes-support/multitech/jsparser_0.3.bb +++ b/recipes-support/multitech/jsparser_0.3.bb @@ -2,7 +2,7 @@ DESCRIPTION = "MultiTech Command Line JSON Parser" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "jsoncpp libmts" -RDEPENDS_${PN} += "bash" +RDEPENDS_${PN} += "bash jsoncpp" PR = "r0" SRCREV="${PV}" diff --git a/recipes-support/multitech/libmts-io/Makefile b/recipes-support/multitech/libmts-io/Makefile new file mode 100644 index 0000000..dc37858 --- /dev/null +++ b/recipes-support/multitech/libmts-io/Makefile @@ -0,0 +1,73 @@ +include version + +APPNAME = libmts-io +SONAME = $(APPNAME).so.$(VERSION) +libdir ?= /usr/lib + +OBJS += \ + src/MTS_IO_TelitRadio.o \ + src/MTS_IO_EG95Radio.o \ + src/MTS_IO_QuectelRadio.o \ + src/MTS_IO_CdmaRadio.o \ + src/MTS_IO_CE910Radio.o \ + src/MTS_IO_CellularRadio.o \ + src/MTS_IO_ICellularRadio.o \ + src/MTS_IO_CellularRadioFactory.o \ + src/MTS_IO_Connection.o \ + src/MTS_IO_DE910Radio.o \ + src/MTS_IO_GE910Radio.o \ + src/MTS_IO_HE910Radio.o \ + src/MTS_IO_HE910DRadio.o \ + src/MTS_IO_HE910EUDRadio.o \ + src/MTS_IO_LE910JN1Radio.o \ + src/MTS_IO_LE866Radio.o \ + src/MTS_IO_LE866A1JSRadio.o \ + src/MTS_IO_LE910Radio.o \ + src/MTS_IO_LE910NAGRadio.o \ + src/MTS_IO_LE910C4NFRadio.o \ + src/MTS_IO_LE910NA1Radio.o \ + src/MTS_IO_LE910SVGRadio.o \ + src/MTS_IO_LE910EUGRadio.o \ + src/MTS_IO_LE910C4EURadio.o \ + src/MTS_IO_LE910EU1Radio.o \ + src/MTS_IO_LE910C1NSRadio.o \ + src/MTS_IO_LE910C1APRadio.o \ + src/MTS_IO_ME910C1NARadio.o \ + src/MTS_IO_ME910C1NVRadio.o \ + src/MTS_IO_ME910C1WWRadio.o \ + src/MTS_IO_ME910Radio.o \ + src/MTS_IO_LockFile.o \ + src/MTS_IO_MccMncTable.o \ + src/MTS_IO_SerialConnection.o + +CC := $(CXX) +CXXFLAGS += -Wall -std=c++0x -fmessage-length=0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden +CPPFLAGS += -I=/usr/include/jsoncpp -Iinclude +LDFLAGS += -s -shared -Wl,-soname,$(APPNAME).so.0 + +.PHONY: all clean install + +all: $(APPNAME).a $(SONAME) + +$(APPNAME).a: $(OBJS) + $(AR) -rs $@ $? + +$(SONAME): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $+ $(LDLIBS) + +# Handle header dependencies +DEPS = $(OBJS:.o=.d) +CPPFLAGS += -MMD +-include $(DEPS) + +install: + mkdir -p $(DESTDIR)$(libdir) + mkdir -p $(DESTDIR)$(includedir)/mts + install -m 0644 $(APPNAME).a $(SONAME) $(DESTDIR)$(libdir)/ + ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(APPNAME).so.0 + ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(APPNAME).so + install -m 0644 include/mts/* $(DESTDIR)$(includedir)/mts/ + +clean: + $(RM) $(OBJS) $(APPNAME).a $(SONAME) $(DEPS) + diff --git a/recipes-support/multitech/radio-cmd_0.4.bb b/recipes-support/multitech/radio-cmd_0.4.bb index b8e5b23..822f178 100644 --- a/recipes-support/multitech/radio-cmd_0.4.bb +++ b/recipes-support/multitech/radio-cmd_0.4.bb @@ -2,7 +2,7 @@ DESCRIPTION = "MultiTech cellular radio command tool" HOMEPAGE = "http://www.multitech.net/" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" - +RDEPENDS_${PN} += "jsoncpp" DEPENDS = "jsoncpp libmts libmts-io" PR = "r0" diff --git a/recipes-support/multitech/radio-query_0.7.bb b/recipes-support/multitech/radio-query_0.7.bb index 5e0b60a..7ce0976 100644 --- a/recipes-support/multitech/radio-query_0.7.bb +++ b/recipes-support/multitech/radio-query_0.7.bb @@ -2,7 +2,7 @@ DESCRIPTION = "MultiTech cellular radio query tool" HOMEPAGE = "http://www.multitech.net/" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" - +RDEPENDS_${PN} += "jsoncpp" DEPENDS = "jsoncpp libmts libmts-io" PR = "r0" |