source: branches/samba-3.5.x/lib/replace/Makefile.in@ 1075

Last change on this file since 1075 was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.5 KB
Line 
1#!gmake
2#
3CC = @CC@
4prefix = @prefix@
5exec_prefix = @exec_prefix@
6bindir = @bindir@
7includedir = @includedir@
8libdir = @libdir@
9VPATH = @libreplacedir@
10srcdir = @srcdir@
11builddir = @builddir@
12sharedbuilddir = @sharedbuilddir@
13INSTALLCMD = @INSTALL@
14LIBS = @LIBS@
15
16.PHONY: test all showflags install installcheck clean distclean realdistclean
17
18CFLAGS=-I. @CFLAGS@
19LDFLAGS=@LDFLAGS@
20
21OBJS = @LIBREPLACEOBJ@
22
23all: showflags libreplace.a testsuite
24
25showflags:
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
32install: all
33 ${INSTALLCMD} -d $(libdir)
34 ${INSTALLCMD} -m 644 libreplace.a $(libdir)
35
36shared-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
42libreplace.a: $(OBJS)
43 ar -rcsv $@ $(OBJS)
44
45test: all
46 ./testsuite
47
48installcheck: install test
49
50TEST_OBJS = test/main.o test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
51
52testsuite: 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
60clean:
61 rm -f *.o test/*.o *.a testsuite
62 rm -f testfile.dat
63
64distclean: clean
65 rm -f *~ */*~
66 rm -f config.log config.status config.h config.cache
67 rm -f Makefile
68
69realdistclean: distclean
70 rm -f configure config.h.in
Note: See TracBrowser for help on using the repository browser.