circuitpython/py/Makefile

49 lines
652 B
Makefile
Raw Normal View History

2013-10-04 14:53:11 -04:00
CC = gcc
CFLAGS = -Wall -ansi -std=gnu99 -Os #-DNDEBUG
LDFLAGS =
SRC = \
malloc.c \
misc.c \
qstr.c \
lexer.c \
lexerfile.c \
parse.c \
scope.c \
compile.c \
emitcommon.c \
emitcpy.c \
emitbc.c \
asmx64.c \
2013-10-04 15:34:47 -04:00
emitx64.c \
2013-10-04 14:53:11 -04:00
emitthumb.c \
asmthumb.c \
runtime.c \
bc.c \
main.c \
SRC_ASM = \
OBJ = $(SRC:.c=.o) $(SRC_ASM:.s=.o)
LIB =
PROG = py
$(PROG): $(OBJ)
$(CC) -o $@ $(OBJ) $(LIB) $(LDFLAGS)
runtime.o: runtime.c
$(CC) $(CFLAGS) -O3 -c -o $@ $<
bc.o: bc.c
$(CC) $(CFLAGS) -O3 -c -o $@ $<
parse.o: grammar.h
compile.o: grammar.h
emitcpy.o: emit.h
emitbc.o: emit.h
emitx64.o: emit.h
emitthumb.o: emit.h
clean:
/bin/rm $(OBJ)