#### Start of system configuration section. ####

srcdir =	@srcdir@
VPATH =		@srcdir@

# Common prefix for machine-independent installed files.
prefix =	@prefix@

# Common prefix for machine-dependent installed files.
exec_prefix =	@exec_prefix@

bindir =	$(exec_prefix)/bin
libdir =	$(exec_prefix)/Sys/libs

INSTALL =	@INSTALL@
INSTALL_DATA =	@INSTALL_DATA@

CC =		@CC@

CFLAGS =	@CFLAGS@
LDFLAGS =	@LDFLAGS@

RANLIB =	@RANLIB@
AR =		ar

#### End system configuration section ####

FLAVOR_CFLAGS =	-m$(CPU) -m$(FPU) -f$(BASE)
OTHER_CFLAGS =	-fomit-frame-pointer
ALL_CFLAGS =	$(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(INCS) $(DEFS)

DEFS =		-DSTATIC_LIBRARY
INCS =		-I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
LIB =		libstatic.a
LIB2 =		libstatic.ba

.c.o:
		$(CC) $(ALL_CFLAGS) -c $< -o $@


SRC=		alloca.c ctime.c getopt.c regex.c \
		errlst.c siglist.c regerror.c regexp.c regsub.c xmalloc.c \
		popen.c 

OBJ=		alloca.o ctime.o getopt.o regex.o \
		errlst.o siglist.o regerror.o regexp.o regsub.o xmalloc.o \
		popen.o 

$(LIB):		$(OBJ)
		rm -f $@
		$(AR) rc $@ $(OBJ)
		$(RANLIB) $@

$(LIB2):	$(OBJ)
		rm -f $(LIB2)
		$(AR) rc $(LIB2) $(OBJ)
		$(RANLIB) $(LIB)

clean:
		rm -f *!

clobber:	clean
		rm -f $(OBJ) $(LIB) $(LIB2)
