new ignore rule for compilation artifacts and makefile rule for installation

This commit is contained in:
cozis
2022-08-11 18:18:40 +02:00
parent c3d4479e97
commit 385e0145b8
5 changed files with 12 additions and 3 deletions
+9
View File
@@ -27,6 +27,11 @@ CLI_SUBDIR = cli
LIB_FNAME = libnoja.a
CLI_FNAME = noja
# Where the build programs will be moved when
# installation occurres.
CLI_INSTALLDIR = /bin
LIB_INSTALLDIR = /usr/local
# Default programs
CC = gcc
AR = ar
@@ -81,6 +86,10 @@ $(LIB): $(LIB_OFILES)
$(CLI): $(CLI_OFILES) $(LIB)
$(CC) $^ -o $@ $(LFLAGS)
install: $(LIB) $(CLI)
sudo cp $(LIB) $(LIB_INSTALLDIR)
sudo cp $(CLI) $(CLI_INSTALLDIR)
clean:
rm -rf $(OBJDIR)
rm -f $(LIB)