Merge branch 'singlecompression' into single
[kai/samba-autobuild/.git] / lib / replace / Makefile.in
1 #!gmake
2 #
3 CC = @CC@
4 prefix = @prefix@
5 exec_prefix = @exec_prefix@
6 bindir = @bindir@
7 includedir = @includedir@
8 libdir = @libdir@
9 VPATH = @libreplacedir@
10 srcdir = @srcdir@
11 builddir = @builddir@
12 INSTALL = @INSTALL@
13 LIBS = @LIBS@
14
15 .PHONY: test all showflags install installcheck clean distclean realdistclean
16
17 CFLAGS=-I. @CFLAGS@
18 LDFLAGS=@LDFLAGS@
19
20 OBJS = @LIBREPLACEOBJ@
21
22 all: showflags libreplace.a testsuite
23
24 showflags:
25         @echo 'libreplace will be compiled with flags:'
26         @echo '  CC     = $(CC)'
27         @echo '  CFLAGS = $(CFLAGS)'
28         @echo '  LDFLAGS= $(LDFLAGS)'
29         @echo '  LIBS   = $(LIBS)'
30
31 install: all
32         mkdir -p $(libdir)
33         $(INSTALL) libreplace.a $(libdir)
34
35 libreplace.a: $(OBJS)
36         ar -rcsv $@ $(OBJS)
37
38 test: all
39         ./testsuite
40
41 installcheck: install test
42
43 TEST_OBJS = test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
44
45 testsuite: libreplace.a $(TEST_OBJS)
46         $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
47
48 .c.o:
49         @echo Compiling $*.c
50         @mkdir -p `dirname $@`
51         @$(CC) $(CFLAGS) -c $< -o $@
52
53 clean:
54         rm -f *.o test/*.o *.a testsuite
55         rm -f testfile.dat
56
57 distclean: clean
58         rm -f *~ */*~
59         rm -f config.log config.status config.h config.cache
60         rm -f Makefile
61
62 realdistclean: distclean
63         rm -f configure config.h.in