# Makefile for the RISC OS version of sdbm


# Define which compiler to use:

CC = cc
#CC = gcc


#########################################
# DO NOT EDIT ANYTHING BELOW THIS LINE! #
#########################################

ifeq (${CC},cc)
CC = cc
AR = libfile
DEPEND = -depend !Depend
CC_FLAGS = -Wpc -zo -fw -throwback -Otime -I@,Unix: -JUnix: -D__riscos__
UNIXLIB = Unix:o.UnixLib
else
ifeq (${CC},gcc)
CC = gcc
AR = ar
CC_FLAGS = -mthrowback -O3 -I. -D__riscos__
else
# No other compiler supported!
endif
endif

LIBOBJS = o.sdbm \
	o.sdbm_hash \
	o.sdbm_lock \
	o.sdbm_pair

.INIT:
	@cdir o

# Static dependencies:

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

# Final targets:

libsdbm: $(LIBOBJS)
        $(AR) $(AR_FLAGS) -c -o libsdbm $(LIBOBJS)

clean:
	-ifthere o.* then wipe o.* ~C~V
	-ifthere libsdbm then wipe libsdbm ~C~V

# Dynamic dependencies:
