# This should be very simple to adapt to the needs of any system.
prefix  = /usr/local
CC      = gcc -pipe
CFLAGS  = -O2 -fomit-frame-pointer -Wall
LDFLAGS = -s -static
CP      = cp -p
RM      = rm -f
#DIET    = diet

.PHONY: all install clean test

alias:	alias.c bname.c envget.c psearch.c selfpath.c var_name.c
	$(DIET) $(CC) $(CFLAGS) alias.c $(ENV) $(LDFLAGS) -o alias

all:	alias

install: alias
	-mkdir -p $(prefix)/bin
	$(CP) alias $(prefix)/bin
	-mkdir -p $(prefix)/man/man1
	$(CP) alias.1 $(prefix)/man/man1

test:	alias
	./test

clean:
	$(RM) alias *core
