r19598: Ahead of a merge to current lorikeet-heimdal:
[Samba.git] / source / lib / replace / Makefile.in
blob10ba5b9415afdb33251ee2285250c535bbc161ad
1 #!gmake
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@
14 .PHONY: test
16 CFLAGS=-I. -I@libreplacedir@ @CFLAGS@
18 OBJS = @LIBREPLACEOBJ@
20 all: showflags libreplace.a testsuite
22 showflags:
23 @echo 'libreplace will be compiled with flags:'
24 @echo ' CC = $(CC)'
25 @echo ' CFLAGS = $(CFLAGS)'
26 @echo ' LIBS = $(LIBS)'
28 install: all
29 mkdir -p $(libdir)
30 $(INSTALL) libreplace.a $(libdir)
32 libreplace.a: $(OBJS)
33 ar -rcsv $@ $(OBJS)
35 test: all
36 ./testsuite
38 installcheck: install test
40 TEST_OBJS = test/testsuite.o test/os2_delete.o
42 testsuite: libreplace.a $(TEST_OBJS)
43 $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace
45 .c.o:
46 @echo Compiling $*.c
47 @mkdir -p `dirname $@`
48 @$(CC) $(CFLAGS) -c $< -o $@
50 clean:
51 rm -f *.o test/*.o *.a testsuite
52 rm -f testfile.dat
54 distclean: clean
55 rm -f *~ */*~
56 rm -f config.log config.status config.h config.cache
57 rm -f Makefile
59 realdistclean: distclean
60 rm -f configure config.h.in