## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## Makefile for LIBLDAP (RISC OS)
##

CC	= cc
LINK	= link
MAKE    = amu
CC_FLAGS=-Wp -throwback -Otime -IUnix:,^.^.include.,^.^.library,^.^.^.regex-0/12 -JUnix: -D__riscos__
LD_FLAGS=Unix:o.unixlib

OBJS	= o.bind o.open o.result o.error o.compare o.search \
	o.controls o.messages o.references o.extended o.cyrus \
	o.modify o.add o.modrdn o.delete o.abandon o.cache \
	o.getfilter o.sasl o.sbind o.kbind o.unbind o.friendly \
	o.free o.disptmpl o.srchpref o.dsparse o.tmplout o.sort \
	o.getdn o.getentry o.getattr o.getvalues o.addentry \
	o.request o.os-ip o.url o.sortctrl o.vlvctrl \
	o.init o.options o.print o.string o.util-int o.schema \
	o.charray o.tls o.dn o.os-local o.dnssrv \
	o.utf-8

## Rule Patterns ##

.SUFFIXES:	.c .o

.c.o:
	$(CC) $(CC_FLAGS) $(DEPEND) $(DEBUG) -c -o $@ $<

# Static dependencies:

all:	libldap apitest ltest ttest

libldap: $(OBJS) libregex liblber
	copy ^.liblber.liblber libldap ~CFR~V
	libfile -i libldap ^.^.^.regex-0/12.o.regex ^.liblber.o.assert ^.liblber.o.decode ^.liblber.o.encode ^.liblber.o.io ^.liblber.o.bprint ^.liblber.o.memory ^.liblber.o.options ^.liblber.o.sockbuf $(OBJS)

apitest:	libldap o.apitest
	$(LINK) -o $@ o.apitest libldap $(LD_FLAGS)
ltest:	libldap o.test
	$(LINK) -o $@ o.test libldap $(LD_FLAGS)
ttest:	libldap o.tmpltest
	$(LINK) -o $@ o.tmpltest libldap $(LD_FLAGS)

libregex:
	dir ^.^.^.regex-0/12
	$(MAKE) libregex
	back

liblber:
	dir ^.liblber
	$(MAKE) liblber
	back

clean:
	-wipe libldap ~CF~V
	-wipe apitest ~CF~V
	-wipe ltest ~CF~V
	-wipe ttest ~CF~V
	-wipe o.* ~CF~V
