summaryrefslogtreecommitdiff
path: root/source4/lib/replace/Makefile.in
blob: 9c16448b92cd81f4f9d7ba56fec0f57be0b592d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
VPATH = @srcdir@
srcdir = @srcdir@
builddir = @builddir@
INSTALL = @INSTALL@

CFLAGS=-I. -I$(srcdir) @CFLAGS@

OBJS = dlfcn.o getpass.o replace.o snprintf.o

all: libreplace.a

install: all
	$(INSTALL) libreplace.a $(libdir)

libreplace.a: $(OBJS)
	ar -rv $@ $(OBJS)
	@-ranlib $@

test: testsuite
	./testsuite

TEST_OBJS = test/testsuite.o

testsuite: libreplace.a $(TEST_OBJS)
	$(CC) -o testsuite $(TEST_OBJS)

.c.o:
	@echo Compiling $*.c
	@mkdir -p `dirname $@`
	@$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f *.o *.a testsuite

distclean: clean
	rm -f *~ */*~
	rm -rf autom4te.cache
	rm -f configure \
		config.log config.status \
		replace_config.h
	rm -f Makefile