Don't use the ACK preprocessor on host files --- use the host preprocessor

instead.

--HG--
branch : default-branch
This commit is contained in:
David Given
2016-03-14 20:58:19 +01:00
parent e85991ec86
commit 88e13ecce3
2 changed files with 26 additions and 14 deletions

View File

@@ -28,6 +28,26 @@ define cfile
$(eval $(cfile-rule))
endef
# --- Host preprocessor
define cppfile-rule
$o: $s
@echo CPP $o
@mkdir -p $(dir $o)
@$(CC) $(CFLAGS) $(cflags) -MM -MQ $o -o $d -x c $s
$(hide) $(CC) $(CFLAGS) $(cflags) -E -P -o $o -x c $s
endef
define cppfile
$(eval s := $1)
$(eval o := $(OBJDIR)/$(objdir)/$(1:=.m))
$(eval d := $(OBJDIR)/$(objdir)/$(1:=.d))
$(eval DEPENDS += $d)
$(eval CLEANABLES += $o $d)
$(eval q += $o)
$(eval $(cppfile-rule))
endef
# --- ACK compiler
define ackfile-rule