circuitpython/unix/Makefile

51 lines
944 B
Makefile
Raw Normal View History

include ../py/mkenv.mk
-include mpconfigport.mk
# define main target
2014-01-19 19:02:39 -05:00
PROG = micropython
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# compiler settings
CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
2014-02-11 07:37:37 -05:00
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
ifeq ($(MICROPY_MOD_TIME),1)
CFLAGS_MOD += -DMICROPY_MOD_TIME=1
SRC_MOD += time.c
endif
ifeq ($(MICROPY_MOD_FFI),1)
CFLAGS_MOD += `pkg-config --cflags libffi` -DMICROPY_MOD_FFI=1
LDFLAGS_MOD += -ldl -lffi
SRC_MOD += ffi.c
endif
# Debugging/Optimization
ifdef DEBUG
CFLAGS += -g
COPT = -O0
else
COPT = -Os #-DNDEBUG
endif
# source files
SRC_C = \
main.c \
gccollect.c \
file.c \
2014-01-18 16:47:44 -05:00
socket.c \
$(SRC_MOD)
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
2013-10-18 14:58:12 -04:00
LIB = -lreadline
# the following is needed for BSD
#LIB += -ltermcap
include ../py/mkrules.mk