mirror of
https://github.com/michaeldv/pit.git
synced 2025-12-08 15:43:25 +00:00
Added PREFIX variable (def:/usr/local) for install
Instead of hard coding without any option to override the installation prefix directory, I added a PREFIX variable with the default value of /usr/local. Also used $(APP) for binary basename references instead of hardcoding "pit". This way if you want to have two versions of pit running you can rename one to, say, pit2.
This commit is contained in:
committed by
Michael Dvorkin
parent
727a022192
commit
f64978d6c2
6
Makefile
6
Makefile
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/make
|
||||
#
|
||||
|
||||
# Prefix directory where pit binary gets installed to.
|
||||
PREFIX = /usr/local
|
||||
|
||||
# The toplevel directory of the source tree.
|
||||
SRCDIR = ./src
|
||||
@@ -84,7 +86,7 @@ $(OBJDIR)/util.o: $(SRCDIR)/util.c $(SRCDIR)/pit.h $(SRCDIR)/object.h $(SRCDIR)/
|
||||
$(CC) -o $(OBJDIR)/util.o -c $(SRCDIR)/util.c
|
||||
|
||||
install:
|
||||
cp $(BINDIR)/pit /usr/local/bin
|
||||
cp $(BINDIR)/$(APP) $(PREFIX)/bin/$(APP)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJDIR)/*.o
|
||||
|
||||
Reference in New Issue
Block a user