5 exec_prefix = @exec_prefix@
7 includedir = @includedir@
9 VPATH = @libreplacedir@
12 sharedbuilddir = @sharedbuilddir@
13 INSTALLCMD = @INSTALL@
16 .PHONY: test all showflags install installcheck clean distclean realdistclean
21 OBJS = @LIBREPLACEOBJ@
23 all: showflags libreplace.a testsuite
26 @echo 'libreplace will be compiled with flags:'
28 @echo ' CFLAGS = $(CFLAGS)'
29 @echo ' LDFLAGS= $(LDFLAGS)'
30 @echo ' LIBS = $(LIBS)'
33 ${INSTALLCMD} -d $(libdir)
34 ${INSTALLCMD} -m 644 libreplace.a $(libdir)
37 ${INSTALLCMD} -d $(sharedbuilddir)/include
38 ${INSTALLCMD} -m 644 replace.h $(sharedbuilddir)/include
39 ${INSTALLCMD} -d $(sharedbuilddir)/lib
40 ${INSTALLCMD} -m 644 libreplace.a $(sharedbuilddir)/lib
48 installcheck: install test
50 TEST_OBJS = test/main.o test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
52 testsuite: libreplace.a $(TEST_OBJS)
53 $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
57 @mkdir -p `dirname $@`
58 @$(CC) $(CFLAGS) -c $< -o $@
61 rm -f *.o test/*.o *.a testsuite
66 rm -f config.log config.status config.h config.cache
69 realdistclean: distclean
70 rm -f configure config.h.in