-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile_srcinf
34 lines (26 loc) · 1.06 KB
/
Makefile_srcinf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
include $(CYCDIR)/Makefile.inc
CYCC:=$(CYCDIR)/bin/$(CYCINFCOMP)
INF_PFX=./inf
INF_ALL_TMP_SRCS=$(addprefix $(INF_PFX)/.cych/, $(ALL_O_SRCS:.o=.cyc))
INF_ALL_C_SRCS=$(addprefix $(INF_PFX)/.cyco/, $(ALL_O_SRCS:.o=.c))
INFFLAGS=--inf --nomerge --ovfat -detailedlocation -infpfx $(INF_PFX)
RESFLAGS=--resolve -stopafter-toc -infpfx $(INF_PFX) -detailedlocation
BBDIR:=$(CYCDIR)/build/boot
INC_PATH:=$(BBDIR) $(BBDIR)/include $(CYCDIR)/lib $(CYCDIR)/src $(CYCDIR)/include
LIB_PATH:=$(CYCDIR)/lib
CYCFLAGS += $(addprefix -I, $(INC_PATH)) -B. -B$(LIB_PATH)
clean_src_inf:
rm -rf $(INF_PFX)
inf_dirs:
mkdir -p $(INF_PFX)/.cych
mkdir -p $(INF_PFX)/.cyco
touch $(INF_PFX)/.cych/parse_tab.cyc
touch $(INF_PFX)/.cych/lex.cyc
#
all: inf_dirs $(INF_ALL_TMP_SRCS) $(INF_ALL_C_SRCS)
$(INF_PFX)/.cych/%.cyc: $(CYCDIR)/src/%.cyc $(CYCC)
$(CYCC) $(INFFLAGS) $(CYCFLAGS) -D__FILE2__=\"$(notdir $<)\" $<
$(INF_PFX)/.cyco/%.c: $(INF_PFX)/.cych/%.cyc
$(CYCC) --manyerrors $(RESFLAGS) $(CYCFLAGS) -D__FILE2__=\"$(notdir $<)\" $< -o $@
inf_stats:
$(CYCC) -infpfx $(INF_PFX) --infstats 2>&1