I have a Makefile
where within:
TARGETDIR=../rel/$(PLATFORM)
ANALYZER=$(TARGETDIR)/analyzer
TARGETS=$(ANALYZER)
XMLFILE=pgns.xml
JSONFILE=pgns.json
all: $(TARGETS)
$(ANALYZER): analyzer.c pgn.c analyzer.h pgn.h ../common/common.c ../common/common.h Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(ANALYZER) -I../common pgn.c analyzer.c ../common/common.c $(LDLIBS$(LDLIBS-$(@)))
json: $(ANALYZER) pgns2json.xslt
$(ANALYZER) -explain-xml >$(XMLFILE) && xsltproc pgns2json.xslt $(XMLFILE) >$(JSONFILE)
$(ANALYSER)
gets compiled and is stored in TARGETDIR
. Now in json
the analyzer
binary is called which provides
| /bin/sh: ../rel/linux-x86_64/analyzer: cannot execute binary file: Exec format error
because upon file analyzer
it show the file as ELF 32-bit
file. I understand incompatibility here.
This has been addressed in the my Previous SE Query.
Since I cannot get around this issue; I was thinking of using the json
call in a postinstall
script in my Recipe.
But I cannot wrap my head around it. These are the steps I have drawn up:
- I modify the
Makefile
which removesjson
- Should I add
DEPENDS = "libxslt libxml2
? - Should I add
RDEPENDS_{PN} = "bash"
to execute the command forjson
? - how should the post-install look like for the recipe?
The Recipe:
SUMMARY = "CANBOAT"
SECTION = "base"
LICENSE = "GPLv3"
#DEPENDS = "libxml2 libxsl"
LIC_FILES_CHKSUM = "file://GPL;md5=05507c6da2404b0e88fe5a152fd12540"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/canboat/canboat.git;branch=${SRCBRANCH}"
SRCBRANCH = "master"
SRCREV = "93b2ebfb334d7a9750b6947d3a4af9b091be2432"
EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}'"
do_compile() {
oe_runmake
}
do_install() {
oe_runmake install
}
#post_install() { # here? what will be the structure}