pointcloud/lib/cunit/Makefile
Éric Lemoine 8165600c61 Build issues when using a specific install prefix (Autotools) (#127)
* Introduce LAZPERF_CPPFLAGS

Without this the las.hpp header file is not found when lazperf was
installed in a non-system place.

* Use GHT_CPPFLAGS

Without this the ght.h header file is not found when libght was installed in
a non-system place.

* Use tabs in Makefiles
2017-01-26 17:43:03 +01:00

55 lines
950 B
Makefile

include ../../config.mk
CPPFLAGS = $(XML2_CPPFLAGS) $(CUNIT_CPPFLAGS) $(ZLIB_CPPFLAGS) $(GHT_CPPFLAGS) -I..
LDFLAGS = $(XML2_LDFLAGS) $(CUNIT_LDFLAGS) $(ZLIB_LDFLAGS) $(GHT_LDFLAGS)
EXE = cu_tester
# ADD YOUR NEW TEST FILE HERE (1/1)
OBJS = \
cu_tester.o \
cu_pc_bytes.o \
cu_pc_schema.o \
cu_pc_point.o \
cu_pc_patch.o \
cu_pc_patch_ght.o \
cu_pc_patch_lazperf.o
ifeq ($(CUNIT_LDFLAGS),)
# No cunit? Emit message and continue
all:
@echo "CUnit not found, skipping build"
check:
@echo "CUnit not found, skipping tests"
else
# Yes cunit? Build tests and run
# Build the unit tester
all: $(EXE)
# Build and run the unit tester
check: $(EXE)
@./$(EXE)
endif
# Build the main unit test executable
$(EXE): $(OBJS) ../$(LIB_A) ../$(LIB_A_LAZPERF)
$(CC) -o $@ $^ $(LDFLAGS) -lm -lstdc++
../$(LIB_A):
$(MAKE) -C .. $(LIB_A)
../$(LIB_A_LAZPERF):
$(MAKE) -C .. $(LIB_A_LAZPERF)
# Clean target
clean:
@rm -f $(OBJS)
@rm -f $(EXE)