# lcdtest: LCD monitor test pattern generator # Makefile # $Id: Makefile 30 2007-05-07 20:58:35Z eric $ # Copyright 2005 Eric Smith # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. Note that permission is # not granted to redistribute this program under the terms of any # other version of the General Public License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA CFLAGS += -Wall -g LDLIBS = -lSDL -lSDL_image BIN = $(DESTDIR)/usr/bin # ----------------------------------------------------------------------------- # You shouldn't have to change anything below this point, but if you do please # let me know why so I can improve this Makefile. # ----------------------------------------------------------------------------- RELEASE = 1.04 CFLAGS += -DRELEASE="$(RELEASE)" PACKAGE = lcdtest TARGETS = lcdtest CSRCS = lcdtest.c SFont.c HDRS = SFont.h HELPFONT = 14P_Arial_Plain_Red.png MISC = COPYING README Makefile DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(HELPFONT) DISTNAME = $(PACKAGE)-$(RELEASE) PPMTOXPM_OPTS = -hexonly #PPMTOXPM_OPTS = all: $(TARGETS) lcdtest: lcdtest.o helpfont.o SFont.o helpfont.c: $(HELPFONT) pngtopnm $(HELPFONT) | ppmtoxpm -name help_font_xpm $(PPMTOXPM_OPTS) | sed 's/static //;s/black/#000000/;s/magenta/#FF00FF/;s/#E40808/#009900/' >helpfont.c install: install ./lcdtest $(BIN) cp -a README $(DESTDIR)/usr/share/doc/lcdtest/ cp -a lcdtest.1 $(DESTDIR)/usr/share/man/man1/ clean: rm -f *.d *.o lcdtest dist: $(DISTFILES) -rm -rf $(DISTNAME) mkdir $(DISTNAME) for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME) -rm -rf $(DISTNAME) DEPENDS = $(CSRCS:.c=.d) %.d: %.c $(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@ include $(DEPENDS)