source: release-kits/lirk3/resources/compile@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 15 years ago

initial import of LiRK3

File size: 620 bytes
Line 
1#!/bin/bash -x
2
3#create an object file (extension .o) for each file to bundle
4objcopy -I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar build/greenstone3.jar.o
5
6#create a header file declaring the bundled files and their sizes
7rm build/mywrapper.h
8size=`du -b greenstone3.jar | sed 's/[^0-9].*//g'`
9echo "extern const char greenstone3jar[$size];" >> build/mywrapper.h
10
11#compile the wrapper program
12g++ -Wall -c -o build/mywrapper.o mywrapper.c
13
14#link, bundling the files to be bundled
15g++ -o greenstone3 build/mywrapper.o build/greenstone3.jar.o
Note: See TracBrowser for help on using the repository browser.