aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-08-04 11:05:28 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-08-04 11:05:28 +0300
commit72dd15b1a9e55a77462ac1ae16e1dd28f304ee59 (patch)
tree75c1cb0531a77b12f3d2711e20e2849f4768b066 /Makefile
parentcb27444929e6c820e3cbd24e249b91dc665c2e1b (diff)
downloadmagi-72dd15b1a9e55a77462ac1ae16e1dd28f304ee59.tar
magi-72dd15b1a9e55a77462ac1ae16e1dd28f304ee59.tar.xz
magi-72dd15b1a9e55a77462ac1ae16e1dd28f304ee59.zip
Fix.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 4a1f80b..c6303fe 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Compilation Options
# Debug mode [yes/no] (allowing to debug the library via gdb):
-DEBUG = no
+DEBUG ?= no
# Specify your favourite C compiler here:
-CC = gcc
+COMPILE ?= gcc
# Specify your include directory (headers location):
-INCDIR = /usr/include
+INCDIR ?= /usr/include
# Specify your libraries directory:
-LIBDIR = /usr/lib
+LIBDIR ?= /usr/lib
# Specify location of man pages on your machine:
-MANDIR = /usr/share/man
+MANDIR ?= /usr/share/man
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -91,11 +91,11 @@ $(TARGET): $(OBJ)
# Compile object files from corresponding source:
$(BUILD)/%.o: %.c
- $(CC) $(CFLAGS) $(SRCINC) -c $< -o $@
+ $(COMPILE) $(CFLAGS) $(SRCINC) -c $< -o $@
# Compile executables from corresponding sources and library:
$(BUILD)/%: %.c $(TARGET)
- $(CC) $(CFLAGS) $(XINC) $< $(LFLAGS) -o $@
+ $(COMPILE) $(CFLAGS) $(XINC) $< $(LFLAGS) -o $@
# Create build directories, if no such:
$(SRCBUILD) $(XBLD):
@@ -103,5 +103,5 @@ $(SRCBUILD) $(XBLD):
# Generate dependency file, adding corresponding build prefixes:
$(DEPS): $(SRC) $(EXASRC) $(EXTER_H) $(INTER_H) $(INCLUDE)/magi.h
- $(CC) $(SRCINC) $(SRC) -MM | sed '/^ /!s#^#$(SRCBUILD)/#' > $@
- $(CC) $(XINC) $(XSRC) -MM | sed '/^ /!s#^#$(XBLD)/#;s/\.o//' >> $@
+ $(COMPILE) $(SRCINC) $(SRC) -MM | sed '/^ /!s#^#$(SRCBUILD)/#' >$@
+ $(COMPILE) $(XINC) $(XSRC) -MM | sed '/^ /!s#^#$(XBLD)/#;s/\.o//' >>$@