# # Makefile for the libident library # MAKE=make SHELL=/bin/sh RM=rm -f RANLIB=ranlib AR=ar cq INSTROOT=/usr/local LIBDIR=$(INSTROOT)/lib INCDIR=$(INSTROOT)/include MANDIR=$(INSTROOT)/man/man3 # # Add -g for debugging information # # Add -DHAVE_ANSIHEADERS if your system have the ANSI C header files # needed for our purposes (stdlib, string, unistd). # CFLAGS = -O -g -DHAVE_ANSIHEADERS -D_REENTRANT LDLIBS = LIBIDENT = libident.a OBJS = ident.o id_open.o id_close.o id_query.o id_parse.o support.o version.o # all: $(LIBIDENT) $(LIBIDENT): $(OBJS) -$(RM) $(LIBIDENT) $(AR) $(LIBIDENT) $(OBJS) -$(RANLIB) $(LIBIDENT) testers: lookup-tester ident-tester ident-tester: $(LIBIDENT) ident-tester.o $(CC) $(CFLAGS) -o ident-tester ident-tester.o $(LIBIDENT) $(LDLIBS) lookup-tester: $(LIBIDENT) lookup-tester.o $(CC) $(CFLAGS) -o lookup-tester lookup-tester.o $(LIBIDENT) $(LDLIBS) ident.o: ident.c ident.h id_open.o: id_open.c ident.h id_close.o: id_close.c ident.h id_query.o: id_query.c ident.h id_parse.o: id_parse.c ident.h support.o: support.c ident.h ident-tester.o: ident-tester.c ident.h lookup-tester.o: lookup-tester.c ident.h version.o: version.c # version: (PACKNAME=`basename \`pwd\`` ; echo 'char id_version[] = "'`echo $$PACKNAME | cut -d- -f2`'";' >version.c) clean: rm -f libident.a *.o