2013-05-12 19:45:55 +00:00
|
|
|
define build-ncg-impl
|
|
|
|
|
|
|
|
$(call reset)
|
|
|
|
|
|
|
|
$(eval cflags += -Imach/$(ARCH)/ncg -I$(OBJDIR)/$D -Imach/proto/ncg)
|
2013-05-13 21:12:46 +00:00
|
|
|
$(eval objdir := $(ARCH))
|
2013-05-12 19:45:55 +00:00
|
|
|
|
|
|
|
$(call cfile, mach/proto/ncg/codegen.c)
|
|
|
|
$(call cfile, mach/proto/ncg/compute.c)
|
|
|
|
$(call cfile, mach/proto/ncg/equiv.c)
|
|
|
|
$(call cfile, mach/proto/ncg/fillem.c)
|
|
|
|
$(call cfile, mach/proto/ncg/gencode.c)
|
|
|
|
$(call cfile, mach/proto/ncg/glosym.c)
|
|
|
|
$(call cfile, mach/proto/ncg/label.c)
|
|
|
|
$(call cfile, mach/proto/ncg/main.c)
|
|
|
|
$(call cfile, mach/proto/ncg/move.c)
|
|
|
|
$(call cfile, mach/proto/ncg/nextem.c)
|
|
|
|
$(call cfile, mach/proto/ncg/reg.c)
|
|
|
|
$(call cfile, mach/proto/ncg/regvar.c)
|
|
|
|
$(call cfile, mach/proto/ncg/salloc.c)
|
|
|
|
$(call cfile, mach/proto/ncg/state.c)
|
|
|
|
$(call cfile, mach/proto/ncg/subr.c)
|
|
|
|
$(call cfile, mach/proto/ncg/var.c)
|
|
|
|
|
|
|
|
$(eval $q: $(OBJDIR)/$D/tables.h)
|
|
|
|
$(eval CLEANABLES += $(OBJDIR)/$D/tables.h $(OBJDIR)/$D/table.c)
|
|
|
|
$(OBJDIR)/$D/tables.c: $(OBJDIR)/$D/tables.h
|
|
|
|
$(OBJDIR)/$D/tables.h: $(NCGG) $(CPPANSI) mach/$(ARCH)/ncg/table
|
|
|
|
@echo NCGG $$@
|
|
|
|
@mkdir -p $$(dir $$@)
|
|
|
|
$(hide) cd $$(dir $$@) && \
|
2013-05-12 22:51:55 +00:00
|
|
|
$(abspath $(CPPANSI)) -I$(abspath mach/$(ARCH)/ncg) $(abspath mach/$(ARCH)/ncg/table) | $(abspath $(NCGG))
|
2013-05-12 19:45:55 +00:00
|
|
|
$(hide) mv $(OBJDIR)/$D/tables.H $(OBJDIR)/$D/tables.h
|
|
|
|
|
|
|
|
$(call cfile, $(OBJDIR)/$D/tables.c)
|
|
|
|
|
|
|
|
$(call file, $(LIBEM_DATA))
|
|
|
|
$(call file, $(LIBFLT_ARITH))
|
|
|
|
|
2013-05-13 21:12:46 +00:00
|
|
|
$(call cprogram, $(BINDIR)/$(ARCH)/ncg)
|
|
|
|
$(call installto, $(PLATDEP)/$(ARCH)/ncg)
|
2013-05-12 19:45:55 +00:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
build-ncg = $(eval $(build-ncg-impl))
|
|
|
|
|