Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow $LOCAL to be overridden by specifying PREFIX variable, and ensure ... #2

Merged
merged 1 commit into from

2 participants

@michaelbartnett

...that $(LOCAL)/lib and $(LOCAL)/include exist and are directories.

Example:

mkdir /opt/custom
make install PREFIX=/opt/custom
@michaelbartnett michaelbartnett Allow $LOCAL to be overridden by specifying PREFIX variable, and ensu…
…re that $(LOCAL)/lib and $(LOCAL)/include exist and are directories.


Example:

    mkdir /opt/custom
    make install PREFIX=/opt/custom
5109171
@kbranigan kbranigan merged commit 3c10ae1 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2012
  1. @michaelbartnett

    Allow $LOCAL to be overridden by specifying PREFIX variable, and ensu…

    michaelbartnett authored
    …re that $(LOCAL)/lib and $(LOCAL)/include exist and are directories.
    
    
    Example:
    
        mkdir /opt/custom
        make install PREFIX=/opt/custom
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 4 deletions.
  1. +11 −4 Makefile
View
15 Makefile
@@ -2,7 +2,8 @@
# Type 'make' then 'make install' to complete the installation of the library
# For 'make install' to work, set LOCAL according to your system configuration
-LOCAL = /usr/local
+PREFIX = /usr/local
+LOCAL = $(PREFIX)
LIB = libSOIL.a
INC = SOIL.h
@@ -44,11 +45,17 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c
clean:
$(DELETER) $(OBJ) $(BIN)
-install: $(BIN)
+$(LOCAL)/lib/:
+ mkdir $(LOCAL)/lib
+
+$(LOCAL)/include/:
+ mkdir $(LOCAL)/include
+
+install: $(BIN) $(LOCAL)/lib/ $(LOCAL)/include/
@echo Installing to: $(LOCAL)/lib and $(LOCAL)/include...
@echo -------------------------------------------------------------------
- $(COPIER) $(BIN) $(LOCAL)/lib
- $(COPIER) $(INCDIR)/$(INC) $(LOCAL)/include
+ $(COPIER) $(BIN) $(LOCAL)/lib/
+ $(COPIER) $(INCDIR)/$(INC) $(LOCAL)/include/
@echo -------------------------------------------------------------------
@echo SOIL library installed. Enjoy!
Something went wrong with that request. Please try again.