diff options
author | Dave Hylands <dhylands@gmail.com> | 2014-01-24 01:05:30 -0800 |
---|---|---|
committer | Dave Hylands <dhylands@gmail.com> | 2014-01-24 08:46:48 -0800 |
commit | c89c681a9f065e66ce817a024fda24abeed9519f (patch) | |
tree | 5696bfbe38d0cb93e7ad0a9b0b14b353d99da740 /unix | |
parent | 2b2cb7b7f4f467b67082f79053118df78f48e66e (diff) | |
download | micropython-c89c681a9f065e66ce817a024fda24abeed9519f.tar.gz micropython-c89c681a9f065e66ce817a024fda24abeed9519f.zip |
Rework makefiles. Add proper dependency checking.
Diffstat (limited to 'unix')
-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 |