diff options
Diffstat (limited to 'unix/Makefile')
-rw-r--r-- | unix/Makefile | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/unix/Makefile b/unix/Makefile index 7a4ce3e161..3db6ae9dfd 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -1,6 +1,7 @@ +include ../py/mkenv.mk + # define main target PROG = micropython -all: $(PROG) # qstr definitions (must come before including py.mk) QSTR_DEFS = qstrdefsport.h @@ -8,12 +9,7 @@ QSTR_DEFS = qstrdefsport.h # include py core make definitions include ../py/py.mk -# program for deletion -RM = /bin/rm -ECHO = @echo - # compiler settings -CC = gcc CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX LDFLAGS = -lm @@ -35,22 +31,5 @@ LIB = -lreadline # the following is needed for BSD #LIB += -ltermcap -$(PROG): $(BUILD) $(OBJ) - $(ECHO) "LINK $<" - $(Q)$(CC) -o $@ $(OBJ) $(LIB) $(LDFLAGS) -ifndef DEBUG - $(Q)strip $(PROG) -endif - $(Q)size $(PROG) - -$(BUILD)/%.o: %.c $(QSTR_DEFS) - $(ECHO) "CC $<" - $(Q)$(CC) $(CFLAGS) -c -o $@ $< - -$(BUILD)/main.o: mpconfigport.h - -clean: - $(RM) -f $(PROG) - $(RM) -rf $(BUILD) +include ../py/mkrules.mk -.PHONY: all clean |