#
# Makefile for host dependent object files for System V
#
HOST=	GENERIC_SYSV
DEFINES=-D$(HOST)
DEBUG=	-O2
CCFLAGS=$(DEFINES) $(DEBUG)
CFLAGS=	-I. -I.. $(CCFLAGS)
LINTFLAGS=-abcehpruz
CC=	gcc

SRC=	local.c lrand48.c dirent.c time.c connect.c xfloat.c
OBJ=	local.o lrand48.o dirent.o time.o connect.o crypt.o xfloat.o
SUBOBJ=	local.o lrand48.o dirent.o time.o crypt.o xfloat.o

dgd:	$(OBJ)
	@for i in $(OBJ); do echo host/$$i; done > dgd

lint:
	lint $(LINTFLAGS) $(CFLAGS) $(SRC) crypt.c

sub:	$(SUBOBJ)
	@for i in $(SUBOBJ); do echo ../host/$$i; done > sub

clean:
	rm -f dgd sub $(SRC) $(OBJ)


local.c: unix/local.c
	cp unix/$@ $@

lrand48.c: unix/lrand48.c
	cp unix/$@ $@

dirent.c: unix/dirent.c
	cp unix/$@ $@

time.c: unix/time.c
	cp unix/$@ $@

connect.c: unix/connect.c
	cp unix/$@ $@

xfloat.c: simfloat.c
	cp simfloat.c $@

$(OBJ):	../dgd.h ../host.h ../config.h ../alloc.h ../error.h
connect.o: ../comm.h
xfloat.o: ../xfloat.h
