#
# Makefile for host dependent object files for BeOS
#
HOST=	BEOS
DEFINES=-D$(HOST)
DEBUG=	-g -DDEBUG
CCFLAGS=$(DEFINES) $(DEBUG)
CFLAGS=	-I. -I.. $(CCFLAGS)
CC=	gcc

SRC=	local.cpp random.c dirent.c time.c connect.c xfloat.c
OBJ=	local.o random.o dirent.o time.o connect.o crypt.o xfloat.o asn.o
SUBOBJ=	local.o random.o dirent.o time.o crypt.o xfloat.o asn.o

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

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

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


local.cpp: beos/local.cpp
	cp beos/$@ $@

random.c: beos/random.c
	cp beos/$@ $@

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

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

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

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

local.o: local.cpp
	$(CC) $(CFLAGS) -c local.cpp

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