Skip to content

Commit

Permalink
Add a PREFIX variable to the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Gelbman committed Jan 24, 2015
1 parent 0349867 commit 78de74d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions INSTALL
Expand Up @@ -10,6 +10,11 @@ To compile with gcc -ansi, run

$ make ANSI=1

To install to a different directory than /usr/local, supply the
PREFIX variable to make:

$ make PREFIX=/usr install

On Windows, the library can be created by first setting up
the correct development environment variables. Usually this
is done by running vcvars32.bat included in the visual studio
Expand Down
7 changes: 4 additions & 3 deletions Makefile
@@ -1,5 +1,6 @@
CFLAGS = -g -Wall -I.
CC = gcc
PREFIX = /usr/local
TESTS = $(patsubst %.c, %, $(wildcard t/*.c))

ifdef ANSI
Expand Down Expand Up @@ -36,11 +37,11 @@ clean:
rm -rf *.o t/*.o libtap.a $(TESTS)

install: libtap.a tap.h
sudo cp libtap.a /usr/lib
sudo cp tap.h /usr/include
install -c libtap.a $(PREFIX)/lib
install -c tap.h $(PREFIX)/include

uninstall:
sudo rm /usr/lib/libtap.a /usr/include/tap.h
rm $(PREFIX)/lib/libtap.a $(PREFIX)/include/tap.h

dist:
rm libtap.zip
Expand Down

0 comments on commit 78de74d

Please sign in to comment.