1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00
Michael Adam d24f3b8a93 libreplace: add extended getifaddrs test that prints out the interfaces.
Michael

cherry-picked from libreplace-part of 9d2bab09aac22c00fe23f1e1265a2dbd0901e9ce
and adapted replacetort creation
(This used to be commit 52d79ad4872a20cf55f31aba97629c2561bfc16c)
2008-02-29 09:30:40 +01:00

64 lines
1.2 KiB
Makefile

#!gmake
#
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
VPATH = @libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
INSTALL = @INSTALL@
LIBS = @LIBS@
.PHONY: test all showflags install installcheck clean distclean realdistclean
CFLAGS=-I. @CFLAGS@
LDFLAGS=@LDFLAGS@
OBJS = @LIBREPLACEOBJ@
all: showflags libreplace.a testsuite
showflags:
@echo 'libreplace will be compiled with flags:'
@echo ' CC = $(CC)'
@echo ' CFLAGS = $(CFLAGS)'
@echo ' LDFLAGS= $(LDFLAGS)'
@echo ' LIBS = $(LIBS)'
install: all
mkdir -p $(libdir)
$(INSTALL) libreplace.a $(libdir)
libreplace.a: $(OBJS)
ar -rcsv $@ $(OBJS)
test: all
./testsuite
installcheck: install test
TEST_OBJS = test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
testsuite: libreplace.a $(TEST_OBJS)
$(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
.c.o:
@echo Compiling $*.c
@mkdir -p `dirname $@`
@$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f *.o test/*.o *.a testsuite
rm -f testfile.dat
distclean: clean
rm -f *~ */*~
rm -f config.log config.status config.h config.cache
rm -f Makefile
realdistclean: distclean
rm -f configure config.h.in