From ca6a0d1b4b96dfd0b9e7b15045dff6dfcfa6caac Mon Sep 17 00:00:00 2001 From: Yey007 <55263178+Yey007@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:48:40 -0500 Subject: [PATCH] Moved install script to main Makefile --- Makefile | 15 +++++++++++++++ install/Makefile | 21 --------------------- 2 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 install/Makefile diff --git a/Makefile b/Makefile index b09f10e..62b2476 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,10 @@ LIBOBJ := $(LIBSRC:.cpp=.o) LIBDEPS := $(LIBOBJ:.o=.d) $(LIBNAME): CFLAGS += $(LIBINCLUDE) +LIBINSTALL := /usr/local/lib +HEADERINSTALL := /usr/local/include +INSTALLNAME := cev_icp + MAINSRC := $(shell find $(SRCDIR) -name "*.cpp" -type f) MAININCLUDE := $(shell sdl2-config --cflags) \ -I/usr/include/eigen3 \ @@ -91,6 +95,17 @@ view: $(MAINNAME) bench: $(MAINNAME) ./$(MAINNAME) -S ex_data/scan$(N)/first.conf -D ex_data/scan$(N)/second.conf --method $(METHOD) --bench +.PHONY: install +install: $(LIBNAME) + mkdir -p $(LIBINSTALL) + mkdir -p $(HEADERINSTALL)/$(INSTALLNAME) + mv $(LIBNAME) $(LIBINSTALL) + cp -r $(INCLUDEDIR)/* $(HEADERINSTALL)/$(INSTALLNAME) + +.PHONY: uninstall +uninstall: + rm -r $(LIBINSTALL)/$(LIBNAME) $(HEADERINSTALL)/$(INSTALLNAME) + # Not building book rn, add these commands to build # cd book; \ pdflatex icp.tex; \ diff --git a/install/Makefile b/install/Makefile deleted file mode 100644 index 5bee482..0000000 --- a/install/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2024 Ethan Uppal. -# TODO: move to main makefile - -LIB := /usr/local/lib -HEADER := /usr/local/include -NAME := cev_icp -LIBNAME := libcevicp.a - -.PHONY: install -install: - cd ..; make $(LIBNAME); mv ./$(LIBNAME) install - mkdir -p $(LIB) - mkdir -p $(HEADER)/$(NAME) - mv $(LIBNAME) $(LIB) - cd ..; \ - cp -r src/icp $(HEADER)/$(NAME)/icp; \ - cp -r src/algo $(HEADER)/$(NAME)/algo - -.PHONY: uninstall -uninstall: - rm -rf $(LIB)/$(LIBNAME) $(HEADER)/$(NAME)