-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
40 lines (33 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
BUILD_DIR ?= build
CMAKE ?= cmake
$(BUILD_DIR)/join-point-clouds:
rm -rf build
$(CMAKE) --version
$(CMAKE) -G Ninja -B $(BUILD_DIR) .
$(CMAKE) --build $(BUILD_DIR) --target join-point-clouds
# Docker
BUILD_CMD = docker buildx build --pull $(BUILD_PUSH) --force-rm --no-cache --build-arg MAIN_TAG=$(MAIN_TAG) --build-arg BASE_TAG=$(BUILD_TAG) --platform linux/$(BUILD_TAG) -f $(BUILD_FILE) -t '$(MAIN_TAG):$(BUILD_TAG)' .
BUILD_PUSH = --load
BUILD_FILE = ./etc/Dockerfile
# CI target that automates pushes, avoid for local
docker: MAIN_TAG = ghcr.io/viam-modules/join-point-clouds
docker: BUILD_TAG = arm64
docker: BUILD_PUSH = --push
docker:
$(BUILD_CMD)
appimage: $(BUILD_DIR)/join-point-clouds
appimage-builder --recipe packaging/appimage-builder.yml
chmod +x viam-camera-join-point-clouds-latest-aarch64.AppImage
module.tar.gz: appimage
mv viam-camera-join-point-clouds-latest-aarch64.AppImage viam-jpc.AppImage
tar czf module.tar.gz viam-jpc.AppImage
rm viam-jpc.AppImage
clean:
rm -rf build *.AppImage
setup:
sudo apt-get update
sudo apt-get install -qqy \
libpcl-dev \
libmpich-dev \
libflann-dev \
cmake