1 # (c) Copyright 2001 by Rob Braun
2 # All rights reserved. The file named COPYRIGHT specifies the terms
3 # and conditions for redistribution.
9 HEADERS = $(SRCDIR)/libportable.h
10 SOURCES = difftime.c inet_aton.c strerror.c fake-getnameinfo.c \
12 OBJECTS = difftime.o inet_aton.o strerror.o fake-getnameinfo.o \
15 INCLUDEFILES = $(HEADERS)
17 # The following variables are used by the 'install' entry and
18 # should be customized:
19 # LIBDIR: where the library will be placed
20 # INCUDEDIR: where the include files will be placed
21 # MANDIR: where the man pages will be placed
23 #LIBDIR = $(HOME)/.links/libraries/$(ARCH)
24 #MANDIR = $(HOME)/.links/manpages/man3
25 #INCLUDEDIR = $(HOME)/.links/includes
28 INCLUDEDIR = ../../include
32 # -DOLD_DIR : must include <sys/dir.h> instead of <dirent.h>
40 # The following variables shouldn't need to be changed
42 CPP_FLAGS = $(CPP_DEFS)
44 CFLAGS = @CFLAGS@ $(CPP_FLAGS) $(CC_FLAGS) -I$(INCLUDEDIR)
47 FMODE = -m 640 # used by install
50 LIBNAME = lib$(NAME).a
56 mv $(LIBNAME) $(LIBDIR)/optimized
59 $(LIBNAME): $(OBJECTS)
64 @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
66 $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
67 ${RANLIB} $(LIBDIR)/$(LIBNAME) ;\
68 echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
69 for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
70 echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
72 echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
76 a=`pwd` ; cd $(INCLUDEDIR) ;\
77 if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
78 a=`pwd` ; cd $(LIBDIR) ;\
79 if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
82 rm -f $(OBJECTS) $(LIBNAME) core
86 spotless: clean uninstall
92 # PUT HERE THE RULES TO MAKE THE OBJECT FILES