Makefile 863 Bytes
Newer Older
1
include ../py/mkenv.mk
2
-include mpconfigport.mk
3

4
# define main target
5
PROG = micropython
6

7
8
9
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h

10
11
# include py core make definitions
include ../py/py.mk
12

13
# compiler settings
14
15
16
17
18
19
20
21
22
23
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

24

25
# Debugging/Optimization
26
ifdef DEBUG
27
CFLAGS += -O0 -g
28
29
30
31
else
CFLAGS += -Os #-DNDEBUG
endif

32
# source files
33
34
SRC_C = \
	main.c \
35
	file.c \
36
	socket.c \
37
	$(SRC_MOD)
38

39
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
Damien's avatar
Damien committed
40
LIB = -lreadline
41
42
# the following is needed for BSD
#LIB += -ltermcap
43

44
include ../py/mkrules.mk
45