2017-01-27 | Paul Boddie | raw annotate files changeset graph | Configure the Makefile using generated secondary Makefiles, replacing the debug-specific Makefile and permitting the selection of included source files. |
1 include native.mk 2 include options.mk 3 4 SRC += exceptions.c main.c ops.c progops.c progtypes.c $(wildcard src/*.c) 5 OBJ = $(SRC:.c=.o) 6 CFLAGS += -Wall -I. -finput-charset=UTF-8 7 LDFLAGS += -lm -lgc 8 9 ifdef ARCH 10 CC := $(ARCH)-$(CC) 11 endif 12 13 all: main 14 15 clean: 16 rm -f main $(OBJ) 17 18 main: $(OBJ) 19 $(CC) $(LDFLAGS) $(OBJ) -o $@ 20 21 .c.o: 22 $(CC) -c $(CFLAGS) $< -o $@