#
# $Id: Makefile.in,v 1.6 2000/05/01 21:16:30 haba Exp $
#

SHELL	= /bin/sh

srcdir	= @srcdir@
VPATH	= @srcdir@

CC	= @CC@
AR	= ar
RANLIB	= @RANLIB@
INCLUDES = -I.					\
	   -I$(srcdir)				\
	   -I../../include			\
	   -I$(srcdir)/../../include		\
	   -I../.. -I$(srcdir)/../..		\
	   -I../../rxdef			\
	   -I$(srcdir)/../../arlad		\
	   -I$(srcdir)/../../xfs/include	\
	   @KRB4_INC_FLAGS@

CFLAGS	= @CFLAGS@

INSTALL 	= @INSTALL@
INSTALL_DATA	= @INSTALL_DATA@
MKINSTALLDIRS	= @top_srcdir@/mkinstalldirs
LN_S		= @LN_S@

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
sysconfdir = @sysconfdir@
ARLACACHEDIR = @ARLACACHEDIR@
ARLACONFFILE = @ARLACONFFILE@

target_os = @target_os@
target_vendor = @target_vendor@
target_cpu = @target_cpu@

#PICFLAGS = @PICFLAGS@
 
LIBNAME = $(LIBPREFIX)arlalib
#LIBEXT = @LIBEXT@
LIBEXT = a
#SHLIBEXT = @SHLIBEXT@
#LIBPREFIX = @LIBPREFIX@
LIBPREFIX = lib
#LDSHARED = @LDSHARED@
LIB = $(LIBNAME).$(LIBEXT)

DEFS = @DEFS@

LIB_SOURCES = arlalib.c arladeb.c fs_lib.c

SOURCES = $(LIB_SOURCES)

LIB_OBJECTS = arlalib.o arladeb.o fs_lib.o

OBJECTS = $(LIB_OBJECTS) 

all: $(LIB)

Wall:
	make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"

arladeb.c: $(srcdir)/../../arlad/arladeb.c
	test -f arladeb.c || $(LN_S) $(srcdir)/../../arlad/arladeb.c arladeb.c

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) $(INCLUDES) $(CFLAGS) $(PICFLAGS) $<

install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/$(LIB)

uninstall:
	rm -f $(DESTDIR)$(libdir)/$(LIB)

TAGS: $(SOURCES)
	etags $(SOURCES)

check:

clean:
	rm -f $(LIB) $(PROGS) *.o *.a

mostlyclean: clean

distclean: clean
	rm -f Makefile *~

realclean: distclean
	rm -f TAGS

$(LIBNAME).a: $(LIB_OBJECTS)
	rm -f $@
	$(AR) cr $@ $(LIB_OBJECTS)
	-$(RANLIB) $@

#$(LIBNAME).$(SHLIBEXT): $(LIB_OBJECTS)
#	rm -f $@
#	$(LDSHARED) -o $@ $(LIB_OBJECTS)

$(OBJECTS): ../../include/config.h

Makefile:	Makefile.in ../../config.status
	cd ../..; CONFIG_FILES=appl/lib/Makefile CONFIG_HEADERS= $(SHELL) config.status


.PHONY: all install uninstall check clean mostlyclean distclean realclean
