gd-libgd / src / Makefile

# $Id$
DIST		= gd
# Remeber to update version in the perl-file too!
VERMAJ		= 1
VERMIN		= 2
VERSION		= $(VERMAJ).$(VERMIN)

BASEDIR		= /usr/local
BINDIR		= $(BASEDIR)/bin
MANDIR		= $(BASEDIR)/man/man1
INSTALLDATA	= install -m 644
INSTALLBIN	= install -m 755

all:
	@echo Type \`make install\' to install $(DIST) in $(BASEDIR)

install:
	$(INSTALLBIN) gdprog $(BINDIR)
	$(INSTALLDATA) gdprog.1 gd.1 $(MANDIR)

clean:
	rm -f *~

veryclean: clean
	rm -f $(DIST)-$(VERSION).tar.gz $(DIST)-$(VERSION).lsm

chmod:
	chmod a+r *
	chmod a+x gdprog

# To let the author make a distribution. The rest of the Makefile
# should be used by the author only.
LSMFILE		= $(DIST)-$(VERSION).lsm
DISTDIR		= $(DIST)-$(VERSION)
DISTFILE	= $(DIST)-$(VERSION).tar.gz
DISTFILES	= README INSTALL $(LSMFILE) \
		  Makefile gdprog gd.1 gdprog.1 gd.ver

$(LSMFILE): FORCE
	VER=$(VERSION); \
	DATE=`date "+%d%b%y"|tr '[a-z]' '[A-Z]'`; \
	sed -e "s/VER/$$VER/g;s/DATE/$$DATE/g" $(DIST).lsm.in > $(LSMFILE)

FORCE:

# Warning: distclean removes the lsm-file, which can not be
# regenerated without the lsm.in-file, which is not part of the package.
distclean: veryclean
	rm -f $(LSMFILE)

dist: $(LSMFILE) chmod
	mkdir $(DISTDIR)
	chmod a+rx $(DISTDIR)
	ln $(DISTFILES) $(DISTDIR)
	tar -cvzf $(DISTFILE) $(DISTDIR)
	chmod a+r $(DISTFILE)
	rm -rf $(DISTDIR)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.