make install to /usr/local by default
@@ -80,13 +80,21 @@ LIBOPENAL = -lopenal
endif
+ifndef INSTALL_DIR
+INSTALL_DIR=/usr/local
+endif
+
all: libhl hl libs
install:
- cp hl /usr/bin
- cp libhl.${LIBEXT} /usr/lib
- cp *.hdll /usr/lib
- cp src/hl.h src/hlc.h src/hlc_main.c /usr/include
+ mkdir -p $(INSTALL_DIR)
+ mkdir -p $(INSTALL_DIR)/bin
+ mkdir -p $(INSTALL_DIR)/lib
+ mkdir -p $(INSTALL_DIR)/include
+ cp hl $(INSTALL_DIR)/bin
+ cp libhl.${LIBEXT} $(INSTALL_DIR)/lib
+ cp *.hdll $(INSTALL_DIR)/lib
+ cp src/hl.h src/hlc.h src/hlc_main.c $(INSTALL_DIR)/include
install_lib:
cp libhl.${LIBEXT} /usr/local/lib
