From 533b5e2db94eb14782c114f4fe0311fb7bb2847c Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Wed, 24 Jan 2024 20:23:15 +0100 Subject: [PATCH] remove old UNIX-specific Makefile --- Makefile | 41 ----------------------------------------- README.md | 14 -------------- example/Makefile | 32 -------------------------------- example/README | 1 - install.sh | 16 ---------------- 5 files changed, 104 deletions(-) delete mode 100644 Makefile delete mode 100644 example/Makefile delete mode 100644 example/README delete mode 100755 install.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index 32574ad3..00000000 --- a/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -PREFIX ?= /usr/local - -CC = gcc -AR = ar - -CFLAGS = -std=gnu99 -fPIC -Wall -Wno-unused-parameter -Wno-unused-function -CFLAGS += -I. -O3 -fno-strict-overflow - -#APRILTAG_SRCS := $(shell ls *.c common/*.c) -APRILTAG_SRCS := apriltag.c apriltag_pose.c apriltag_quad_thresh.c common/g2d.c common/getopt.c common/homography.c common/image_u8.c common/image_u8x3.c common/image_u8x4.c common/matd.c common/pam.c common/pjpeg.c common/pjpeg-idct.c common/pnm.c common/string_util.c common/svd22.c common/time_util.c common/unionfind.c common/workerpool.c common/zarray.c common/zhash.c common/zmaxheap.c tag16h5.c tag25h9.c tag36h11.c tagCircle21h7.c tagCircle49h12.c tagCustom48h12.c tagStandard41h12.c tagStandard52h13.c -APRILTAG_HEADERS := $(shell ls *.h common/*.h) -APRILTAG_OBJS := $(APRILTAG_SRCS:%.c=%.o) -TARGETS := libapriltag.a libapriltag.so - -.PHONY: all -all: $(TARGETS) - @$(MAKE) -C example all - -.PHONY: install -install: libapriltag.so - @chmod +x install.sh - @./install.sh $(PREFIX)/lib libapriltag.so - @./install.sh $(PREFIX)/include/apriltag $(APRILTAG_HEADERS) - @ldconfig - -libapriltag.a: $(APRILTAG_OBJS) - @echo " [$@]" - @$(AR) -cq $@ $(APRILTAG_OBJS) - -libapriltag.so: $(APRILTAG_OBJS) - @echo " [$@]" - @$(CC) -fPIC -shared -o $@ $^ - -%.o: %.c - @echo " $@" - @$(CC) -o $@ -c $< $(CFLAGS) - -.PHONY: clean -clean: - @rm -rf *.o common/*.o $(TARGETS) - @$(MAKE) -C example clean diff --git a/README.md b/README.md index 51f1a5eb..b62327c0 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ Table of Contents ================= - [Papers](#papers) - [Install](#install) - - [cmake](#cmake) - - [make](#make) - [Usage](#usage) - [Choosing a Tag Family](#choosing-a-tag-family) - [Getting Started with the Detector](#getting-started-with-the-detector) @@ -44,8 +42,6 @@ Officially only Linux operating systems are supported, although users have had s The default installation will place headers in /usr/local/include and shared library in /usr/local/lib. It also installs a pkg-config script into /usr/local/lib/pkgconfig and will install a python wrapper if python3 is installed. -## cmake -If you have CMake installed, then do: ``` cmake -B build -DCMAKE_BUILD_TYPE=Release cmake --build build --target install @@ -65,16 +61,6 @@ to generate and compile via the ninja build script. It will be much faster than You can omit `--target install` if you only want to use this locally without installing. -## make -Otherwise, we have a handwritten makefile you can use (be warned it will do slightly different things): -``` -make -j -sudo make install -``` - -To install to a different directory than /usr/local: - - $ PREFIX=/some/path sudo make install Usage ===== diff --git a/example/Makefile b/example/Makefile deleted file mode 100644 index 6027428e..00000000 --- a/example/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -CC = gcc -CXX = g++ - -CPPFLAGS = -I.. `pkg-config --cflags opencv4` -CFLAGS = -g -std=gnu99 -Wall -Wno-unused-parameter -Wno-unused-function -O3 -CXXFLAGS = -g -Wall -O3 -LDFLAGS = -lpthread -lm - -TARGETS := apriltag_demo opencv_demo - -.PHONY: all -all: apriltag_demo opencv_demo - -apriltag_demo: apriltag_demo.o ../libapriltag.a - @echo " [$@]" - @$(CC) -o $@ $^ $(LDFLAGS) - -opencv_demo: opencv_demo.o ../libapriltag.a - @echo " [$@]" - @$(CXX) -o $@ $^ $(LDFLAGS) `pkg-config --libs opencv4` - -%.o: %.c - @echo " $@" - @$(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS) - -%.o: %.cc - @echo " $@" - @$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) - -.PHONY: clean -clean: - @rm -rf *.o $(TARGETS) diff --git a/example/README b/example/README deleted file mode 100644 index 5b3167df..00000000 --- a/example/README +++ /dev/null @@ -1 +0,0 @@ -These example programs are meant for distribution, and thus will not build in the april2 tree without modifications. diff --git a/install.sh b/install.sh deleted file mode 100755 index 04bb5b2f..00000000 --- a/install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -e - -# Usage: install.sh TARGET [RELATIVE PATHS ...] -# -# e.g. ./install.sh /usr/local foo/file1 foo/file2 ... -# This creates the files /usr/local/foo/file1 and /usr/local/foo/file2 - -TARGETDIR=$1 -shift - -for src in "$@"; do - dest=$TARGETDIR/$src - mkdir -p $(dirname $dest) - cp $src $dest - echo $dest -done