| 1 |
CC=@CC@ |
| 2 |
@SET_MAKE@ |
| 3 |
|
| 4 |
# Note: we include the additional tweaking of top_builddir, so that LIBTOOL |
| 5 |
# resolves to the correct place. |
| 6 |
top_builddir=@top_builddir@/../../../ |
| 7 |
top_srcdir=@top_srcdir@ |
| 8 |
module_srcdir=@top_builddir@/.. |
| 9 |
srcdir=@srcdir@ |
| 10 |
VPATH=@srcdir@ |
| 11 |
|
| 12 |
include $(top_builddir)/Make.rules |
| 13 |
|
| 14 |
# Necessary redefinitions |
| 15 |
INCLUDES=-I. -I.. -I$(top_srcdir) -I$(top_srcdir)/include @INCLUDES@ |
| 16 |
CPPFLAGS=$(ADDL_CPPFLAGS) -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES) |
| 17 |
LDFLAGS=-L$(top_srcdir)/lib @LIBDIRS@ |
| 18 |
|
| 19 |
EXEEXT=@EXEEXT@ |
| 20 |
|
| 21 |
TEST_API_DEPS=\ |
| 22 |
$(top_srcdir)/src/pool.o \ |
| 23 |
$(top_srcdir)/src/sets.o \ |
| 24 |
$(top_srcdir)/src/str.o \ |
| 25 |
$(top_srcdir)/src/support.o \ |
| 26 |
$(top_srcdir)/src/table.o \ |
| 27 |
$(top_srcdir)/src/netaddr.o \ |
| 28 |
$(top_srcdir)/src/event.o \ |
| 29 |
$(top_srcdir)/src/fsio.o \ |
| 30 |
$(top_srcdir)/src/log.o \ |
| 31 |
$(top_srcdir)/src/privs.o \ |
| 32 |
$(module_srcdir)/crypto.o \ |
| 33 |
$(module_srcdir)/base32.o \ |
| 34 |
$(module_srcdir)/otp.o |
| 35 |
|
| 36 |
TEST_API_LIBS=-lcheck |
| 37 |
|
| 38 |
TEST_API_OBJS=\ |
| 39 |
api/base32.o \ |
| 40 |
api/otp.o \ |
| 41 |
api/stubs.o \ |
| 42 |
api/tests.o |
| 43 |
|
| 44 |
|
| 45 |
all: |
| 46 |
@echo "Running make from top level directory." |
| 47 |
cd ../; $(MAKE) all |
| 48 |
|
| 49 |
dummy: |
| 50 |
|
| 51 |
Makefile: Makefile.in ../config.status |
| 52 |
cd ../ && ./config.status |
| 53 |
|
| 54 |
api/.c.o: |
| 55 |
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< |
| 56 |
|
| 57 |
api-tests$(EXEEXT): $(TEST_API_OBJS) $(TEST_API_DEPS) |
| 58 |
$(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $(TEST_API_DEPS) $(TEST_API_OBJS) $(LIBS) $(TEST_API_LIBS) |
| 59 |
./$@ |
| 60 |
|
| 61 |
check-api: dummy api-tests$(EXEEXT) |
| 62 |
|
| 63 |
clean: |
| 64 |
$(LIBTOOL) --mode=clean $(RM) *.o api/*.o api-tests$(EXEEXT) api-tests.log |