7 CC = ${CROSSCOMPILE}gcc
8 CXX = ${CROSSCOMPILE}g++
10 RANLIB = ${CROSSCOMPILE}ranlib
15 CFLAG_SO = -fPIC #-fPIC not always needed, but good to have
16 CFLAGS = -Wall -I./include -g ${CFLAG_SO}
17 CXXFLAGS = -Wall -I./include -g ${CFLAG_SO}
21 SOLIB = libpnd.so.1 # canonicle name
22 SOLIB1 = libpnd.so.1.0.1 # versioned name
23 XMLOBJ = lib/tinyxml/tinystr.o lib/tinyxml/tinyxml.o lib/tinyxml/tinyxmlerror.o lib/tinyxml/tinyxmlparser.o
24 ALLOBJ = pnd_conf.o pnd_container.o pnd_discovery.o pnd_pxml.o pnd_notify.o pnd_locate.o pnd_tinyxml.o pnd_pndfiles.o pnd_apps.o pnd_utility.o pnd_desktop.o
26 all: ${SOLIB} ${LIB} conftest discotest notifytest pndnotifyd rawpxmltest pndvalidator
29 ${RM} -f ${ALLOBJ} ${XMLOBJ} ${LIB} ${SOLIB1} locatetest.o bin/locatetest conftest.o bin/conftest discotest.o bin/discotest bin/notifytest notifytest.o bin/rawpxmltest rawpxmltest.o bin/pndnotifyd pndnotifyd.o ${SOLIB} testdata/dotdesktop/*.desktop testdata/apps/*.pnd testdata/dotdesktop/*.png deployment/usr/lib/libpnd* deployment/usr/bin/pndnotifyd deployment/usr/pandora/scripts/* deployment/etc/sudoers deployment/etc/init.d/pndnotifyd bin/pndvalidator pndvalidator.o
30 ${RM} -rf deployment/media
31 find . -name "*~*" -exec rm {} \; -print
36 libpnd.a: ${ALLOBJ} ${XMLOBJ}
37 ${AR} r ${LIB} ${ALLOBJ} ${XMLOBJ}
40 libpnd.so.1: ${ALLOBJ} ${XMLOBJ}
41 ${CC} -shared -Wl,-soname,${SOLIB} -o ${SOLIB1} ${ALLOBJ} ${XMLOBJ}
42 ln -f -s ${SOLIB1} ${SOLIB}
44 ${SOLIB1}: ${ALLOBJ} ${XMLOBJ}
45 ${CC} -shared -Wl,-soname,${SOLIB} -o ${SOLIB1} ${ALLOBJ} ${XMLOBJ}
46 ln -f -s ${SOLIB1} ${SOLIB}
48 pndnotifyd: pndnotifyd.o ${SOLIB1}
49 ${CC} -lstdc++ -o bin/pndnotifyd pndnotifyd.o ${SOLIB1}
51 pndvalidator: pndvalidator.o ${SOLIB1}
52 ${CC} -lstdc++ -o bin/pndvalidator pndvalidator.o ${SOLIB1}
54 # deployment and assembly components
58 # build x86_ls with icon
59 cd testdata/pndsample; ../scripts/pnd_make.sh -p x86_ls.pnd -d x86_ls -i x86_ls/zeldaicon.png -x x86_ls/PXML.xml
60 # build x86_echo with no icon
61 cd testdata/pndsample; ../scripts/pnd_make.sh -p x86_echo.pnd -d x86_echo -x x86_echo/PXML.xml
64 # populate deployment directory for copying into image bakes
66 mkdir -p deployment/etc/pandora/conf
67 mkdir -p deployment/usr/lib
68 mkdir -p deployment/usr/bin
69 mkdir -p deployment/usr/pandora/apps
70 mkdir -p deployment/usr/pandora/scripts
71 mkdir -p deployment/etc/init.d/
72 # premake the directories that SD's mount onto; makes pndnotifyd life easier
73 mkdir -p deployment/media/mmcblk0p1
74 mkdir -p deployment/media/mmcblk1p1
76 cp libpnd* deployment/usr/lib
77 cp bin/pndnotifyd deployment/usr/bin
78 cp testdata/scripts/* deployment/usr/pandora/scripts
79 # copy in freebee .pnd apps to /usr/pandora/apps
80 # add pndnotify to etc/rc/startup-whatever
81 cp testdata/sh/pndnotifyd deployment/etc/init.d/pndnotifyd
82 cp testdata/sh/sudoers deployment/etc/sudoers
87 conftest: conftest.o ${LIB}
88 ${CC} -lstdc++ -o bin/conftest conftest.o libpnd.a
90 discotest: discotest.o ${LIB}
91 ${CC} -lstdc++ -o bin/discotest discotest.o libpnd.a
93 notifytest: notifytest.o ${LIB}
94 ${CC} -lstdc++ -o bin/notifytest notifytest.o libpnd.a
96 locatetest: locatetest.o ${SOLIB1}
97 ${CC} -lstdc++ -o bin/locatetest locatetest.o ${SOLIB1}
99 rawpxmltest: rawpxmltest.o ${LIB}
100 ${CC} -lstdc++ -o bin/rawpxmltest rawpxmltest.o ${LIB}