Lichen

templates/Makefile

664:6a264fb5a367
2017-03-07 Paul Boddie Switched to using normal, named function parameters instead of arrays. This requires a special function to convert any array-based arguments to the positioned arguments. However, parameters no longer need to be dereferenced when used in functions. Specialised macros are required to invoke functions with different numbers of parameters. Fortunately, the macros required can be deduced from the functions defined in the program. normal-function-parameters
     1 include native.mk     2 include modules.mk     3 include options.mk     4      5 SRC += calls.c exceptions.c main.c ops.c progops.c progtypes.c     6 OBJ = $(SRC:.c=.o)     7 CFLAGS += -Wall -I. -finput-charset=UTF-8 -O2     8 LDFLAGS += -lm -lgc     9     10 ifdef ARCH    11 CC := $(ARCH)-$(CC)    12 endif    13     14 all: main    15     16 clean:    17 	rm -f main $(OBJ)    18     19 main: $(OBJ)    20 	$(CC) $(LDFLAGS) $(OBJ) -o $@    21     22 .c.o:    23 	$(CC) -c $(CFLAGS) $< -o $@