Add a GiteaPC build system #1

Merged
Slyvtt merged 2 commits from :master into master 2022-07-09 18:00:07 +02:00
3 changed files with 27 additions and 0 deletions
Showing only changes of commit 93ac24def1 - Show all commits

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