include make.config

all:
	make protos
	make stre
	make tester

#######################################################################
clean:
	rm -f *.p *.o core stre tester
	(cd util ; make clean)

#######################################################################
install:
	cp -f stre $(INSTALL_PATH)
	chown root.root $(INSTALL_PATH)/stre

#######################################################################
DEPS	= misc.c main.c
OBJ	= misc.o main.o
OBJT	= misc.o tester.o

protos:
	(cd util ; make)
	util/mkprotos2 $(DEPS) > protos.p

stre: $(OBJ)
	$(CC) $(CFLAGS) -o stre $(OBJ)
	strip stre

tester: $(OBJT)
	$(CC) $(CFLAGS) -o tester $(OBJT)
	strip tester

#######################################################################
%.o: %.c *.h
	$(CC) $(CFLAGS) -c $< -o $@
