PACKAGE		= QNXsched
VERSION		= 1.21
ARCH		= i386
PKG		= $(PACKAGE)-$(VERSION)
SRC_PKG		= $(PKG).tar.gz
CC		= gcc
CCOPTS		= -Wall -O -g
PREFIX		= /usr/local
BIN		= $(PREFIX)/bin

all:		qsched

clean:
	rm -f *~ TAGS core *.o qsched

dep:		depend

depend:
	$(CC) -M *.c > .depend

dist:	srcdist
	make install
	make clean

distclean:	clean
	rm -rf $(SRC_PKG)
	touch *

indent:
	indent *.h *.c
	make clean

install:	qsched
	install -c -m 0755 qsched $(BIN)
	strip --strip-debug $(BIN)/qsched

srcdist:	distclean
	{ \
	  cd .. ; \
	  tar chzvf $(PKG)/$(SRC_PKG) $(PKG)/* ; \
	}

ifeq (.depend, $(wildcard .depend))
  include .depend
endif

% :		%.c
	$(CC) $(CCOPTS) -o $@ $<
