2017-03-07 | Paul Boddie | file changeset files shortlog | 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 |
paul@511 | 1 | include native.mk |
paul@539 | 2 | include modules.mk |
paul@511 | 3 | include options.mk |
paul@511 | 4 | |
paul@664 | 5 | SRC += calls.c exceptions.c main.c ops.c progops.c progtypes.c |
paul@126 | 6 | OBJ = $(SRC:.c=.o) |
paul@658 | 7 | CFLAGS += -Wall -I. -finput-charset=UTF-8 -O2 |
paul@511 | 8 | LDFLAGS += -lm -lgc |
paul@126 | 9 | |
paul@450 | 10 | ifdef ARCH |
paul@450 | 11 | CC := $(ARCH)-$(CC) |
paul@450 | 12 | endif |
paul@450 | 13 | |
paul@126 | 14 | all: main |
paul@126 | 15 | |
paul@126 | 16 | clean: |
paul@126 | 17 | rm -f main $(OBJ) |
paul@126 | 18 | |
paul@126 | 19 | main: $(OBJ) |
paul@126 | 20 | $(CC) $(LDFLAGS) $(OBJ) -o $@ |
paul@126 | 21 | |
paul@126 | 22 | .c.o: |
paul@126 | 23 | $(CC) -c $(CFLAGS) $< -o $@ |