Fix up the libnet tests.
[samba.git] / source / 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
14 .PHONY: test all showflags install installcheck clean distclean realdistclean
15
16 CFLAGS=-I. @CFLAGS@
17 LDFLAGS=@LDFLAGS@
18
19 OBJS = @LIBREPLACEOBJ@
20
21 all: showflags libreplace.a testsuite
22
23 showflags:
24         @echo 'libreplace will be compiled with flags:'
25         @echo '  CC     = $(CC)'
26         @echo '  CFLAGS = $(CFLAGS)'
27         @echo '  LDFLAGS= $(LDFLAGS)'
28
29 install: all
30         mkdir -p $(libdir)
31         $(INSTALL) libreplace.a $(libdir)
32
33 libreplace.a: $(OBJS)
34         ar -rcsv $@ $(OBJS)
35
36 test: all
37         ./testsuite
38
39 installcheck: install test
40
41 TEST_OBJS = test/testsuite.o test/os2_delete.o test/strptime.o
42
43 testsuite: libreplace.a $(TEST_OBJS)
44         $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS)
45
46 .c.o:
47         @echo Compiling $*.c
48         @mkdir -p `dirname $@`
49         @$(CC) $(CFLAGS) -c $< -o $@
50
51 clean:
52         rm -f *.o test/*.o *.a testsuite
53         rm -f testfile.dat
54
55 distclean: clean
56         rm -f *~ */*~
57         rm -f config.log config.status config.h config.cache
58         rm -f Makefile
59
60 realdistclean: distclean
61         rm -f configure config.h.in