Merge pull request 'Add a GiteaPC build system' (#1) from Lephenixnoir/libSerial:master into master

Reviewed-on: https://gitea.planet-casio.com/Slyvtt/libSerial/pulls/1
This commit is contained in:
Sylvain PILLOT 2022-07-09 18:00:07 +02:00
commit 1c4cacffb6
3 changed files with 31 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,9 @@ CSOURCES=$(wildcard src/*.c)
OBJECTS=$(SHSOURCES:.S=.o) $(CSOURCES:.c=.o) $(CXXSOURCES:.cpp=.o)
LIBRARY=./libserial.a
LIBDIR:=$(shell $(CC) -print-file-name=.)
INCDIR:=$(LIBDIR)/include
all: $(SOURCES) $(LIBRARY)
$(LIBRARY): $(OBJECTS)
@ -30,3 +33,12 @@ $(LIBRARY): $(OBJECTS)
clean:
rm -f $(OBJECTS) $(LIBRARY)
install:
@ echo "Installing library in $(LIBDIR)"
@ echo "Installing include in $(INCDIR)"
cp $(LIBRARY) $(LIBDIR)
cp include/serial.h $(INCDIR)
uninstall:
rm -f $(LIBDIR)/$(LIBRARY)
rm -f $(INCDIR)/serial.h

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