# Makefile for the kpathsea library for RISC OS
# Written by Jakob Stoklund Olesen

CC = cc
LINK = drlink -o $@ -rescan
LIBFILE = MakeALF -o $@
CPPFLAGS = -DRISCOS -I^,,C:
CCFLAGS = -fah -wad ${CPPFLAGS} -depend !Depend -throwback

LIBS = kpathsea:o.kpathsea C:o.stubs

.SUFFIXES: .c .o

.c.o:;	$(CC) -c $< -o $@ $(CCFLAGS)

# Test target: TESTFILE should be defined on the CLI
TESTFILE=c.direct-io
tester: ${TESTFILE}
	$(CC) -c $(TESTFILE) -o o.test-obj $(CCFLAGS) -DTEST
	$(LINK) o.test-obj $(LIBS)
	remove o.test-obj

# Dynamic dependencies:
o.test-obj:	c.direct-io
o.test-obj:	h.direct-io
o.test-obj:	h.xperror
o.test-obj:	C:h.kernel
