# NS-Killer Epplet makefile # # Questions about this makefile? -> jed@5-20.org # # If you are logged into an Enlightenment session, your # EROOT and EBIN environment variables should be set. # If not, uncomment these and correct them for your system. # #EROOT = /usr/local/enlightenment #EBIN = /usr/local/enlightenment/bin # you can define an alternate sound player here # PLAYER = /usr/bin/esdplay PLAYER = `which esdplay` # that should be all you need! # NAME = NS-Killer VERSION = 0.9 DATA = files DOC_OR_DATA = 1 # compiler optimization (0 Default, 1 Medium, 2 High) OPT_LEVEL = 2 EPPLET = $(NAME).epplet ICON = $(NAME).icon DOC = $(NAME).ABOUT DATAPATH = ${EROOT}/epplet_data/$(NAME) # change "-w" to "-Wall" to see lots of warnings OPTS = $(CFLAGS) -I/usr/X11R6/include -w -O$(OPT_LEVEL) LIBS = -L/usr/X11R6/lib -lepplet all: $(EPPLET) %.epplet: %.c @echo "Compiling $@ with optimization level $(OPT_LEVEL)" @echo "Using $(PLAYER) as a sound player." @gcc ${OPTS} $(NAME).c -DPLYSND=\"$(PLAYER)\" -o $@ ${LIBS} @strip $@ @if [ -e $(EPPLET) ]; then echo "Finished.";\ echo "so far, so good.";fi install: $(EPPLET) @if [ -z "${EROOT}" -o -z "${EBIN}" ]; then\ echo Enlightenment environment not set!; exit 1; fi @echo Installing $(NAME) with: @echo " "EROOT=${EROOT} @echo " "EBIN=${EBIN} @if [ ! .$(DOC_OR_DATA). = .. -a ! .$(DATAPATH). = .. ]; then\ if [ ! -d $(DATAPATH) ]; then\ mkdir $(DATAPATH);\ echo $(DATAPATH) created;\ fi;\ cp -r $(DOC) $(DATA) $(DATAPATH)/;\ echo $(DOC) $(DATA) installed;\ fi @cp $(EPPLET) ${EBIN}/ @echo $(EPPLET) installed @if [ ! .$(ICON). = .. ]; then\ cp $(ICON) ${EROOT}/epplet_icons/;\ echo $(ICON) installed; fi @echo "Ready to go!" uninstall: @if [ -x ${EBIN}/$(EPPLET) ]; then\ rm ${EBIN}/$(EPPLET);\ echo ${EBIN}/$(EPPLET) deleted; fi @if [ -f ${EROOT}/epplet_icons/$(ICON) ]; then\ rm ${EROOT}/epplet_icons/$(ICON);\ echo ${EROOT}/epplet_icons/$(ICON) deleted; fi @if [ -d $(DATAPATH) ]; then\ rm -rf $(DATAPATH);\ echo $(DATAPATH) deleted; fi @echo "All gone... =(" clean: @if [ -e $(EPPLET) ]; then\ rm -f $(EPPLET); echo $(EPPLET) cleaned; fi @if [ -e core ]; then\ rm -f core; echo "Found a core!, it's not there anymore. =)"; fi @echo "spick and span" dist: $(EPPLET) @cd .. ; tar czf $(NAME)-$(VERSION).tgz $(NAME) @echo "Package: $(NAME)-$(VERSION).tgz created."