Lichen

Annotated templates/Makefile

477:faa1569c867f
2017-01-19 Paul Boddie Enabled all compiler warnings, fixed attribute initialiser warnings along with various control-flow and variable warnings.
paul@354 1
SRC = exceptions.c main.c $(wildcard native/*.c) ops.c progops.c progtypes.c $(wildcard src/*.c)
paul@126 2
OBJ = $(SRC:.c=.o)
paul@477 3
CFLAGS = -Wall -I. -finput-charset=UTF-8
paul@433 4
LDFLAGS = -lm -lgc
paul@126 5
paul@450 6
ifdef ARCH
paul@450 7
CC := $(ARCH)-$(CC)
paul@450 8
endif
paul@450 9
paul@126 10
all: main
paul@126 11
paul@126 12
clean:
paul@126 13
	rm -f main $(OBJ)
paul@126 14
paul@126 15
main: $(OBJ)
paul@126 16
	$(CC) $(LDFLAGS) $(OBJ) -o $@
paul@126 17
paul@126 18
.c.o:
paul@126 19
	$(CC) -c $(CFLAGS) $< -o $@