add a GiteaPC build system

This commit is contained in:
Lephenixnoir 2022-07-09 12:55:52 +01:00
parent ea93ab3087
commit 93ac24def1
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
3 changed files with 27 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
libserial.a
src/*.o
giteapc-config.make

View File

@ -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)

16
giteapc.make Normal file
View File

@ -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