# MAKEFILE:
# library Makefile
#
# Copyright (C) 1994 Keith Mason. All Rights Reserved.
# Copyright (C) 1994 The Board of Trustees of  
# The Leland Stanford Junior University.  All Rights Reserved.
#
# Authors: Paul Kunz, and Keith Mason


TARGLIB = ../libobjcX.a

CC = gcc

#
# Define the following if desired
#
# HAVE_LIBDLD   - have the dld library (for objc-load and NXBundle)
#
#DEFINES = -DHAVE_LIBDLD

CFLAGS = -ggdb3 -Wall -I- -I.. $(DEFINES)


SOURCES = *.[cm]

# Specify all the members to be included in the library

LIBMEMS = \
	  $(TARGLIB)(find_exec.o) \
	  $(TARGLIB)(hashtable.o) \
	  $(TARGLIB)(objc-load.o) \
	  $(TARGLIB)(zone.o)

# And now the inference rules, archiving the .o files into the library.

.SUFFIXES : .m .c
.m.a:
	$(CC) ${CFLAGS} $(OTHER_CFLAGS) -c -o $% $<
	ar rv $@ $%
	rm -f $%

.c.a:
	$(CC) $(CFLAGS) $(OTHER_CFLAGS) -c -o $% $<
	ar rv $@ $%
	rm -f $%

# the targets

all: lib

lib: $(TARGLIB)

$(TARGLIB) : $(LIBMEMS)
	ranlib $@

