14 CFLAG_SO = -fPIC #-fPIC not always needed, but good to have
15 CFLAGS = -Wall -I./include -g ${CFLAG_SO}
16 CXXFLAGS = -Wall -I./include -g ${CFLAG_SO}
20 SOLIB = libpnd.so.1 # canonicle name
21 SOLIB1 = libpnd.so.1.0.1 # versioned name
22 XMLOBJ = lib/tinyxml/tinystr.o lib/tinyxml/tinyxml.o lib/tinyxml/tinyxmlerror.o lib/tinyxml/tinyxmlparser.o
23 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
25 all: ${SOLIB} ${LIB} conftest discotest notifytest locatetest pndnotifyd
28 ${RM} -f ${ALLOBJ} ${XMLOBJ} ${LIB} ${SOLIB1} locatetest.o bin/locatetest conftest.o bin/conftest discotest.o bin/discotest bin/notifytest notifytest.o bin/pndnotifyd pndnotifyd.o ${SOLIB} testdata/dotdesktop/*.desktop testdata/apps/*.pnd
29 find . -name "*~*" -exec rm {} \; -print
34 libpnd.a: ${ALLOBJ} ${XMLOBJ}
35 ${AR} r ${LIB} ${ALLOBJ} ${XMLOBJ}
38 libpnd.so.1: ${ALLOBJ} ${XMLOBJ}
39 ${CC} -shared -Wl,-soname,${SOLIB} -o ${SOLIB1} ${ALLOBJ} ${XMLOBJ}
40 ln -f -s ${SOLIB1} ${SOLIB}
42 pndnotifyd: pndnotifyd.o ${SOLIB1}
43 ${CC} -lstdc++ -o bin/pndnotifyd pndnotifyd.o ${SOLIB1}
45 # deployment and assembly components
49 # build x86_ls with icon
50 cd testdata/pndsample; ../scripts/pnd_make.sh x86_ls.pnd x86_ls/PXML.xml x86_ls
51 cd testdata/pndsample; cat x86_ls/zeldaicon.png >> x86_ls.pnd
52 # build x86_echo with no icon
53 cd testdata/pndsample; ../scripts/pnd_make.sh x86_echo.pnd x86_echo/PXML.xml x86_echo
56 # populate deployment directory for copying into image bakes
58 mkdir -p deployment/etc/pandora/conf
59 mkdir -p deployment/usr/lib
60 mkdir -p deployment/usr/bin
61 mkdir -p deployment/usr/pandora/apps
62 mkdir -p deployment/usr/pandora/scripts
64 cp libpnd* deployment/usr/lib
65 cp bin/pndnotifyd deployment/usr/bin
66 cp testdata/scripts/* deployment/usr/pandora/scripts
67 # copy in freebee .pnd apps to /usr/pandora/apps
68 # add pndnotify to etc/rc/startup-whatever
73 conftest: conftest.o ${LIB}
74 ${CC} -lstdc++ -o bin/conftest conftest.o libpnd.a
76 discotest: discotest.o ${LIB}
77 ${CC} -lstdc++ -o bin/discotest discotest.o libpnd.a
79 notifytest: notifytest.o ${LIB}
80 ${CC} -lstdc++ -o bin/notifytest notifytest.o libpnd.a
82 locatetest: locatetest.o ${SOLIB1}
83 ${CC} -lstdc++ -o bin/locatetest locatetest.o ${SOLIB1}