1
0
mirror of https://github.com/janet-lang/janet synced 2025-02-23 11:40:01 +00:00

Include header path when building modules.

This commit is contained in:
Calvin Rose 2019-02-18 20:27:00 -05:00
parent b61c9eb991
commit 7927078b49
2 changed files with 6 additions and 1 deletions

View File

@ -227,6 +227,7 @@ install: $(JANET_TARGET)
mkdir -p $(JANET_PATH)
cp tools/cook.janet $(JANET_PATH)
cp tools/highlight.janet $(JANET_PATH)
cp tools/bars.janet $(JANET_PATH)
mkdir -p $(MANPATH)
cp janet.1 $(MANPATH)

View File

@ -94,7 +94,11 @@
(def OPTIMIZE 2)
(def CC (if is-win "cl" "cc"))
(def LD (if is-win "link" (string CC " -shared")))
(def CFLAGS (string (if is-win "/O" "-std=c99 -Wall -Wextra -fpic -O") OPTIMIZE))
(def CFLAGS (string
(if is-win "/I" "-I")
module/*headerpath*
(if is-win " /O" " -std=c99 -Wall -Wextra -fpic -O")
OPTIMIZE))
(defn- compile-c
"Compile a C file into an object file."