PROGS = dsphpi-read dsphpi-write dsphpi-start dsphpi-init

CC = gcc
STRIP = strip
INSTALL = install
SRC = $(shell ls *.c)
HDRS = $(shell ls *.h)
INSTALLDIR = $(DESTDIR)/sbin

all : $(PROGS)

$(PROGS) : $(SRC)

$(SRC) : $(HDRS)

$(PROGS) : mifaxadp-dsphpi.h
	$(CC) -o $@ $@.c

install : $(PROGS)
	$(STRIP) $(PROGS)
	$(INSTALL) -c -d $(INSTALLDIR)
	$(INSTALL) -c $(PROGS) $(INSTALLDIR)

clean : 
	rm -f $(PROGS)
