emitcm7.c was the same wrapper trick as the checker: nineteen #define renames, a textual include of emit_c.c, and a per-unit feature scan choosing between two emitters. Five of the M7 halves fell through to their M6 counterpart, so those become the single entry point with the old body renamed to *_core; the other thirteen never delegated at all and simply replace the M6 version. The scan is gone from both places it was used -- the program entry and the expression emitter, whose switch already ended in a default that delegates. fe_emit_c_program_core went with the dispatch that was its only caller. emitcm7.c is deleted and the build compiles emit_c.c directly. Nothing in the compiler now selects an implementation by looking for `?` or `!` in a unit. This is the pair to the checker commit; together they end the two-engine split that produced four of the five defects fixed while getting M7 to pass.
21 lines
473 B
Makefile
21 lines
473 B
Makefile
CC ?= cc
|
|
CFLAGS ?= -O2 -Wall -Wextra -std=c89
|
|
CPPFLAGS ?= -Isrc
|
|
SRC = src/arena.c src/diag.c src/lexer.c src/ast.c src/parser.c src/types.c src/m7.c src/own.c src/check.c src/lower.c src/emit_c.c src/driver.c
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
.PHONY: all clean dos-build
|
|
all: fec
|
|
|
|
fec: $(OBJ)
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(OBJ)
|
|
|
|
src/%.o: src/%.c
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
dos-build:
|
|
@echo "Run build-dos.bat inside FreeDOS/Open Watcom."
|
|
|
|
clean:
|
|
$(RM) $(OBJ) fec
|