Makefile 661 Bytes
Newer Older
1
2
include ../py/mkenv.mk

3
# define main target
4
PROG = micropython
5

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

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

12
# compiler settings
13
CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX
14
CFLAGS += -I/usr/lib/libffi-3.0.13/include
15
LDFLAGS = -lm -ldl -lffi
16

17
# Debugging/Optimization
18
ifdef DEBUG
19
CFLAGS += -O0 -g
20
21
22
23
else
CFLAGS += -Os #-DNDEBUG
endif

24
# source files
25
26
SRC_C = \
	main.c \
27
	file.c \
28
	socket.c \
29
	ffi.c \
30

31
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
Damien's avatar
Damien committed
32
LIB = -lreadline
33
34
# the following is needed for BSD
#LIB += -ltermcap
35

36
include ../py/mkrules.mk
37