From 93ac24def13e38944b750534cebf4e5cb5dda5d2 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Sat, 9 Jul 2022 12:55:52 +0100 Subject: [PATCH] add a GiteaPC build system --- .gitignore | 3 +++ Makefile | 8 ++++++++ giteapc.make | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 giteapc.make diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a7678a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +libserial.a +src/*.o +giteapc-config.make diff --git a/Makefile b/Makefile index f8374f3..2bb5b8d 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,8 @@ CSOURCES=$(wildcard src/*.c) OBJECTS=$(SHSOURCES:.S=.o) $(CSOURCES:.c=.o) $(CXXSOURCES:.cpp=.o) LIBRARY=./libserial.a +LIBDIR:=$(shell $(CC) -print-file-name=.) + all: $(SOURCES) $(LIBRARY) $(LIBRARY): $(OBJECTS) @@ -30,3 +32,9 @@ $(LIBRARY): $(OBJECTS) clean: rm -f $(OBJECTS) $(LIBRARY) +install: + @ echo "Installing in $(LIBDIR)" + cp $(LIBRARY) $(LIBDIR) + +uninstall: + rm -f $(LIBDIR)/$(LIBRARY) diff --git a/giteapc.make b/giteapc.make new file mode 100644 index 0000000..f7ca60d --- /dev/null +++ b/giteapc.make @@ -0,0 +1,16 @@ +# giteapc: version=1 + +-include giteapc-config.make + +configure: + +build: + @ make + +install: + @ make install + +uninstall: + @ make uninstall + +.PHONY: configure build install uninstall