X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=f2122a42b7180f9db3ba7a5b1cfdcd625b63779f;hb=34108c2d3c2fd2c248951f310b692c32bd459cbb;hp=14564da3dfc0ae5dc7b467d9f4f40ac8873090b4;hpb=c2df73cf09db1c3a0315b6644d8cec64eeeffb35;p=pandora-libraries.git diff --git a/Makefile b/Makefile index 14564da..f2122a4 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ # # tools -CC = gcc -AR = ar -RANLIB = ranlib +CC = ${CROSSCOMPILE}gcc +AR = ${CROSSCOMPILE}ar +RANLIB = ${CROSSCOMPILE}ranlib RM = rm # environment @@ -20,14 +20,18 @@ LIB = libpnd.a SOLIB = libpnd.so.1 # canonicle name SOLIB1 = libpnd.so.1.0.1 # versioned name XMLOBJ = lib/tinyxml/tinystr.o lib/tinyxml/tinyxml.o lib/tinyxml/tinyxmlerror.o lib/tinyxml/tinyxmlparser.o -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 +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 all: ${SOLIB} ${LIB} conftest discotest notifytest locatetest pndnotifyd clean: - ${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 + ${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 testdata/dotdesktop/*.png deployment/usr/lib/libpnd* deployment/usr/bin/pndnotifyd deployment/usr/pandora/scripts/* deployment/etc/sudoers deployment/etc/init.d/pndnotifyd + ${RM} -rf deployment/media find . -name "*~*" -exec rm {} \; -print +# component targets +# + libpnd.a: ${ALLOBJ} ${XMLOBJ} ${AR} r ${LIB} ${ALLOBJ} ${XMLOBJ} ${RANLIB} ${LIB} @@ -36,6 +40,42 @@ libpnd.so.1: ${ALLOBJ} ${XMLOBJ} ${CC} -shared -Wl,-soname,${SOLIB} -o ${SOLIB1} ${ALLOBJ} ${XMLOBJ} ln -f -s ${SOLIB1} ${SOLIB} +pndnotifyd: pndnotifyd.o ${SOLIB1} + ${CC} -lstdc++ -o bin/pndnotifyd pndnotifyd.o ${SOLIB1} + +# deployment and assembly components +# + +pnd: + # build x86_ls with icon + cd testdata/pndsample; ../scripts/pnd_make.sh -p x86_ls.pnd -d x86_ls -i x86_ls/zeldaicon.png -x x86_ls/PXML.xml + # build x86_echo with no icon + cd testdata/pndsample; ../scripts/pnd_make.sh -p x86_echo.pnd -d x86_echo -x x86_echo/PXML.xml + +deploy: + # populate deployment directory for copying into image bakes + # make dirs + mkdir -p deployment/etc/pandora/conf + mkdir -p deployment/usr/lib + mkdir -p deployment/usr/bin + mkdir -p deployment/usr/pandora/apps + mkdir -p deployment/usr/pandora/scripts + mkdir -p deployment/etc/init.d/ + # premake the directories that SD's mount onto; makes pndnotifyd life easier + mkdir -p deployment/media/mmcblk0p1 + mkdir -p deployment/media/mmcblk1p1 + # copy in goodies + cp libpnd* deployment/usr/lib + cp bin/pndnotifyd deployment/usr/bin + cp testdata/scripts/* deployment/usr/pandora/scripts + # copy in freebee .pnd apps to /usr/pandora/apps + # add pndnotify to etc/rc/startup-whatever + cp testdata/sh/pndnotifyd deployment/etc/init.d/pndnotifyd + cp testdata/sh/sudoers deployment/etc/sudoers + +# test tool targets +# + conftest: conftest.o ${LIB} ${CC} -lstdc++ -o bin/conftest conftest.o libpnd.a @@ -47,6 +87,3 @@ notifytest: notifytest.o ${LIB} locatetest: locatetest.o ${SOLIB1} ${CC} -lstdc++ -o bin/locatetest locatetest.o ${SOLIB1} - -pndnotifyd: pndnotifyd.o ${SOLIB1} - ${CC} -lstdc++ -o bin/pndnotifyd pndnotifyd.o ${SOLIB1}