diff options
| author | Damien George | 2014-02-01 10:44:17 -0800 |
|---|---|---|
| committer | Damien George | 2014-02-01 10:44:17 -0800 |
| commit | 6fcaea6ca898ba7dd75ed62d5338852b270cc0de (patch) | |
| tree | a480e463632d24256db7a8886346c1c65cf1b1aa /unix/Makefile | |
| parent | fb083ea986d758c7426fda091c4899f0511aaa8c (diff) | |
| parent | ed1239fce60f8cfe710637a5e0591f2b2a64b65d (diff) | |
Merge pull request #254 from pfalcon/config-modules
Add mpconfigport.mk file to configure which modules to include into build
Diffstat (limited to 'unix/Makefile')
| -rw-r--r-- | unix/Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/unix/Makefile b/unix/Makefile index db01ccf9a..2d959bf73 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -1,4 +1,5 @@ include ../py/mkenv.mk +-include mpconfigport.mk # define main target PROG = micropython @@ -10,9 +11,16 @@ QSTR_DEFS = qstrdefsport.h include ../py/py.mk # compiler settings -CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX -CFLAGS += -I/usr/lib/libffi-3.0.13/include -LDFLAGS = -lm -ldl -lffi +CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) +LDFLAGS = $(LDFLAGS_MOD) -lm + +ifeq ($(MICROPY_MOD_FFI),1) +# Note - include path below is specific to @dpgeorge +CFLAGS_MOD += -I/usr/lib/libffi-3.0.13/include -DMICROPY_MOD_FFI=1 +LDFLAGS_MOD += -ldl -lffi +SRC_MOD += ffi.c +endif + # Debugging/Optimization ifdef DEBUG @@ -26,7 +34,7 @@ SRC_C = \ main.c \ file.c \ socket.c \ - ffi.c \ + $(SRC_MOD) OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) LIB = -lreadline |
