ack/mach/proto/ncg/build.mk
David Given 07453d184a Top, topgen, aelflod. Moved the libraries back into the platform-specific
directories --- wrangling descr files was too hard. C programs can be built
for cpm, pc86, linux386, linux68k!

--HG--
branch : dtrg-buildsystem
rename : util/ack/build.mk => util/led/build.mk
rename : util/LLgen/build.mk => util/topgen/build.mk
2013-05-13 23:26:15 +01:00

47 lines
1.4 KiB
Makefile

define build-ncg-impl
$(call reset)
$(eval cflags += -Imach/$(ARCH)/ncg -I$(OBJDIR)/$D -Imach/proto/ncg)
$(eval objdir := $(ARCH))
$(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 $$@) && \
$(abspath $(CPPANSI)) -I$(abspath mach/$(ARCH)/ncg) $(abspath mach/$(ARCH)/ncg/table) | $(abspath $(NCGG))
$(hide) mv $(OBJDIR)/$D/tables.H $(OBJDIR)/$D/tables.h
$(call cfile, $(OBJDIR)/$D/tables.c)
$(call file, $(LIBEM_DATA))
$(call file, $(LIBFLT_ARITH))
$(call cprogram, $(BINDIR)/$(PLATFORM)/ncg)
$(call installto, $(PLATDEP)/$(PLATFORM)/ncg)
endef
build-ncg = $(eval $(build-ncg-impl))