~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to lib/replace/Makefile.in

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
sharedbuilddir = @sharedbuilddir@
 
13
INSTALLCMD = @INSTALL@
 
14
LIBS = @LIBS@
 
15
 
 
16
.PHONY: test all showflags install installcheck clean distclean realdistclean
 
17
 
 
18
CFLAGS=-I. @CFLAGS@
 
19
LDFLAGS=@LDFLAGS@
 
20
 
 
21
OBJS = @LIBREPLACEOBJ@
 
22
 
 
23
all: showflags libreplace.a testsuite
 
24
 
 
25
showflags:
 
26
        @echo 'libreplace will be compiled with flags:'
 
27
        @echo '  CC     = $(CC)'
 
28
        @echo '  CFLAGS = $(CFLAGS)'
 
29
        @echo '  LDFLAGS= $(LDFLAGS)'
 
30
        @echo '  LIBS   = $(LIBS)'
 
31
 
 
32
install: all
 
33
        ${INSTALLCMD} -d $(libdir)
 
34
        ${INSTALLCMD} -m 644 libreplace.a $(libdir)
 
35
 
 
36
shared-build: all
 
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
 
41
 
 
42
libreplace.a: $(OBJS)
 
43
        ar -rcsv $@ $(OBJS)
 
44
 
 
45
test: all
 
46
        ./testsuite
 
47
 
 
48
installcheck: install test
 
49
 
 
50
TEST_OBJS = test/main.o test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
 
51
 
 
52
testsuite: libreplace.a $(TEST_OBJS)
 
53
        $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
 
54
 
 
55
.c.o:
 
56
        @echo Compiling $*.c
 
57
        @mkdir -p `dirname $@`
 
58
        @$(CC) $(CFLAGS) -c $< -o $@
 
59
 
 
60
clean:
 
61
        rm -f *.o test/*.o *.a testsuite
 
62
        rm -f testfile.dat
 
63
 
 
64
distclean: clean
 
65
        rm -f *~ */*~
 
66
        rm -f config.log config.status config.h config.cache
 
67
        rm -f Makefile
 
68
 
 
69
realdistclean: distclean
 
70
        rm -f configure config.h.in