#!/usr/bin/make -f

default: all

# DESTDIR is for GNU Autotools compatibility...
DESTDIR ?= /
prefix ?= usr/local

INSTALL_DEST = $(shell echo $(DESTDIR)/$(prefix)/include/s11n.net/phoenix | sed -e 's/\/\//\//g')

INSTALL_HEADERS = phoenix.hpp
DIST_FILES = Makefile README phoenix.hpp configure


PACKAGE_VERSION = 2004.08.17
PACKAGE_NAME = libphoenix++-$(PACKAGE_VERSION)


dist:
	-rm -fr $(PACKAGE_NAME)
	mkdir $(PACKAGE_NAME)
	cp $(DIST_FILES) $(PACKAGE_NAME)
	tar czf $(PACKAGE_NAME).tar.gz $(PACKAGE_NAME)
	rm -fr $(PACKAGE_NAME)



$(INSTALL_DEST):
	test -d $@ && exit 0; \
		mkdir -p $@

install: $(INSTALL_DEST)
	cp $(INSTALL_HEADERS) $(INSTALL_DEST)


clean:
	-rm -fr *~ $(PACKAGE_NAME) $(PACKAGE_NAME).tar.gz

distclean:

all:
	@echo -e "This directory needs to special building. \
To install run:\n\
\t${MAKE} install [prefix=some/prefix] [DESTDIR=/some_root]\n\
The header(s) will be installed to DESTDIR/prefix/include/s11n.net/phoenix\n\
Defaults:\n\
\tDESTDIR=$(DESTDIR)\n\
\tprefix=$(prefix)"




