Skip to content

Commit d5f1ff1

Browse files
committed
Add xyz_kitti module
1 parent f098015 commit d5f1ff1

7 files changed

+1316
-105
lines changed

Makefile

+25
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,28 @@ setup:
2424
clean: ## Clean
2525
@rm -rf $(BLD_DIR)
2626

27+
$(BLD_DIR)/test_%: src/test_%.c libxyz
28+
@echo "TEST [$(notdir $@)]"
29+
@$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) -lxyz
30+
31+
$(BLD_DIR)/%.o: src/%.c src/%.h Makefile
32+
@echo "CC [$(notdir $<)]"
33+
$(CC) $(CFLAGS) -c $< -o $@
34+
35+
$(BLD_DIR)/xyz_ceres.o: src/xyz_ceres.cpp Makefile
36+
@echo "CXX [$(notdir $<)]"
37+
g++ -Wall -O3 \
38+
-c $< \
39+
-o $(BLD_DIR)/$(basename $(notdir $<)).o \
40+
-I/usr/include/eigen3
41+
42+
$(BLD_DIR)/libxyz.a: $(LIBXYZ_OBJS)
43+
@echo "AR [libxyz.a]"
44+
$(AR) $(ARFLAGS) \
45+
$(BLD_DIR)/libxyz.a \
46+
$(LIBXYZ_OBJS) \
47+
> /dev/null 2>&1
48+
2749
libxyz: setup $(BLD_DIR)/libxyz.a ## Build libxyz
2850

2951
install: ## Install libxyz
@@ -89,6 +111,9 @@ tests: $(TESTS)
89111

90112
ci: ## Run CI tests
91113
@make tests CI_MODE=1 --no-print-directory
114+
@cd ./build && $(foreach TEST, $(TESTS), ./$(notdir ${TEST});)
115+
116+
all: libxyz tests
92117

93118
cppcheck: ## Run cppcheck on xyz.c
94119
@cppcheck src/xyz.c src/xyz.h

0 commit comments

Comments
 (0)