Makefile 835 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. MODULE_TOPDIR = ../../..
  2. include $(MODULE_TOPDIR)/include/Make/Vars.make
  3. MOD_OBJS := $(filter-out test.o port_test.o,$(AUTO_OBJS))
  4. LIB = DIG2
  5. include $(MODULE_TOPDIR)/include/Make/Lib.make
  6. EXTRA_INC = $(VECT_INC)
  7. EXTRA_CFLAGS = $(VECT_CFLAGS)
  8. LIBES = $(GISLIB) $(RTREELIB) $(MATHLIB)
  9. #compile if LFS (Large File Support) present:
  10. ifneq ($(USE_LARGEFILES),)
  11. TESTFILE = test64.ok
  12. else
  13. TESTFILE = test32.ok
  14. endif
  15. default: lib
  16. @echo "==============TEST============="
  17. ifeq ($(strip $(CROSS_COMPILING)),)
  18. $(MAKE) test
  19. endif
  20. test: $(OBJDIR)/test.tmp $(TESTFILE)
  21. cmp $(OBJDIR)/test.tmp $(TESTFILE)
  22. $(OBJDIR)/test.tmp: $(OBJDIR)/test$(EXE)
  23. cd $(OBJDIR) && $(call run_grass,./test)
  24. # Test portable read/write functions
  25. $(OBJDIR)/test$(EXE): $(OBJDIR)/test.o $(DIG2DEP)
  26. $(call linker)
  27. $(OBJDIR)/test$(EXE): LIBES = $(DIG2LIB)