aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-11-06 13:17:38 +0100
committerKarel Kočí <cynerd@email.cz>2016-11-06 13:17:38 +0100
commit2f13e507c5069d0de3bd9fe65c1d48348d329fdd (patch)
tree81ad94f8da6f2fa1b651604b9123ef35f3bd0f2c /Makefile
parentde427bb856c7d0a19bbed031cd8f7b36de9ed605 (diff)
downloadgeml-2f13e507c5069d0de3bd9fe65c1d48348d329fdd.tar.gz
geml-2f13e507c5069d0de3bd9fe65c1d48348d329fdd.tar.bz2
geml-2f13e507c5069d0de3bd9fe65c1d48348d329fdd.zip
Add CPREFIX configuration and fix external build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 3a5f87e..ea16c12 100644
--- a/Makefile
+++ b/Makefile
@@ -19,11 +19,14 @@ endif
CFLAGS += -Wall
CFLAGS += -Iinclude -include $(O)/build/config.h
+# Apply CPREFIX
+CC:=$(CPREFIX)$(CC)
+
### Source files list ###########################
SRC = geml.c \
- utils.c \
- io.c \
- parser.c
+ args_parser.c \
+ io.c \
+ utils.c
### End of source files list ####################
CSRC = $(patsubst %,src/%,$(filter %.c,$(SRC)))
@@ -93,7 +96,7 @@ $(OBJ): $(O)/build/%.o: src/%.c $(O)/build/config.h
$(O)/build/config.h: $(O)/.config
@mkdir -p "$(@D)"
@echo " CONF $@"
- $(Q)./configure --op-h > $@
+ $(Q)$(O)/configure --op-h > $@
endif
## Configuation files ##
@@ -102,7 +105,7 @@ $(O)/.config:
$(O)/.config.mk: $(O)/.config
@echo " CONF $@"
- $(Q)./configure --op-makefile > $@
+ $(Q)$(O)/configure --op-makefile > $@
## Documentation targets ##
.PHONY: docs
@@ -118,7 +121,7 @@ serve-docs: docs/parser-states.dot.png
clean-docs:
@echo " CLEAN docs"
$(Q)$(RM) docs/parser-states.dot.png
- $(Q)$(RM) -r site
+ $(Q)$(RM) -r html
docs/%.dot.png: docs/%.dot
@echo " DOT $@"