2024-12-23 13:54:11 +01:00
|
|
|
GCCELNA_INSTALL_NAME := $(shell echo gccelna|sed '$(program_transform_name)')
|
|
|
|
GCCELNA_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gccelna|sed '$(program_transform_name)')
|
|
|
|
|
|
|
|
elna: elna1$(exeext)
|
|
|
|
|
|
|
|
.PHONY: elna
|
|
|
|
|
|
|
|
# Driver
|
|
|
|
|
|
|
|
GCCELNA_OBJS = \
|
|
|
|
$(GCC_OBJS) \
|
|
|
|
elna/elna-spec.o \
|
|
|
|
$(END)
|
|
|
|
|
|
|
|
gccelna$(exeext): $(GCCELNA_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS)
|
|
|
|
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
|
|
|
$(GCCELNA_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \
|
|
|
|
$(EXTRA_GCC_LIBS) $(LIBS)
|
|
|
|
|
|
|
|
# The compiler proper
|
|
|
|
|
|
|
|
elna_OBJS = \
|
|
|
|
elna/elna1.o \
|
2024-12-27 23:38:25 +01:00
|
|
|
elna/elna-generic.o \
|
|
|
|
elna/elna-convert.o \
|
|
|
|
elna/elna-diagnostic.o \
|
2024-12-29 22:28:53 +01:00
|
|
|
elna/elna-tree.o \
|
2024-12-23 13:54:11 +01:00
|
|
|
elna/ast.o \
|
|
|
|
elna/driver.o \
|
|
|
|
elna/lexer.o \
|
|
|
|
elna/parser.o \
|
|
|
|
elna/result.o \
|
|
|
|
elna/semantic.o \
|
|
|
|
elna/symbol_table.o \
|
|
|
|
elna/types.o \
|
|
|
|
$(END)
|
|
|
|
|
|
|
|
elna1$(exeext): attribs.o $(elna_OBJS) $(BACKEND) $(LIBDEPS)
|
|
|
|
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
|
|
|
attribs.o $(elna_OBJS) $(BACKEND) $(LIBS) $(BACKENDLIBS)
|
|
|
|
|
|
|
|
elna.all.cross:
|
|
|
|
|
|
|
|
elna.start.encap: gccelna$(exeext)
|
|
|
|
elna.rest.encap:
|
|
|
|
|
|
|
|
# No elna-specific selftests.
|
|
|
|
selftest-elna:
|
|
|
|
|
|
|
|
elna.install-common: installdirs
|
|
|
|
-rm -f $(DESTDIR)$(bindir)/$(GCCELNA_INSTALL_NAME)$(exeext)
|
|
|
|
$(INSTALL_PROGRAM) gccelna$(exeext) $(DESTDIR)$(bindir)/$(GCCELNA_INSTALL_NAME)$(exeext)
|
|
|
|
rm -f $(DESTDIR)$(bindir)/$(GCCELNA_TARGET_INSTALL_NAME)$(exeext); \
|
|
|
|
( cd $(DESTDIR)$(bindir) && \
|
|
|
|
$(LN) $(GCCELNA_INSTALL_NAME)$(exeext) $(GCCELNA_TARGET_INSTALL_NAME)$(exeext) ); \
|
|
|
|
|
|
|
|
# Required goals, they still do nothing
|
|
|
|
elna.install-man:
|
|
|
|
elna.install-info:
|
|
|
|
elna.install-pdf:
|
|
|
|
elna.install-plugin:
|
|
|
|
elna.install-html:
|
|
|
|
elna.info:
|
|
|
|
elna.dvi:
|
|
|
|
elna.pdf:
|
|
|
|
elna.html:
|
|
|
|
elna.man:
|
|
|
|
elna.mostlyclean:
|
|
|
|
elna.clean:
|
|
|
|
elna.distclean:
|
|
|
|
elna.maintainer-clean:
|
|
|
|
|
|
|
|
# make uninstall
|
|
|
|
elna.uninstall:
|
|
|
|
-rm -f gccelna$(exeext) elna1$(exeext)
|
|
|
|
-rm -f $(elna_OBJS)
|
|
|
|
|
|
|
|
# Used for handling bootstrap
|
|
|
|
elna.stage1: stage1-start
|
|
|
|
-mv elna/*$(objext) stage1/elna
|
|
|
|
elna.stage2: stage2-start
|
|
|
|
-mv elna/*$(objext) stage2/elna
|
|
|
|
elna.stage3: stage3-start
|
|
|
|
-mv elna/*$(objext) stage3/elna
|
|
|
|
elna.stage4: stage4-start
|
|
|
|
-mv elna/*$(objext) stage4/elna
|
|
|
|
elna.stageprofile: stageprofile-start
|
|
|
|
-mv elna/*$(objext) stageprofile/elna
|
|
|
|
elna.stagefeedback: stagefeedback-start
|
|
|
|
-mv elna/*$(objext) stagefeedback/elna
|
|
|
|
|
2024-12-30 23:12:47 +01:00
|
|
|
ELNA_INCLUDES = -I $(srcdir)/elna/include -I elna/generated
|
2024-12-23 13:54:11 +01:00
|
|
|
|
2024-12-30 23:12:47 +01:00
|
|
|
elna/%.o: elna/source/%.cc elna/generated/parser.hh elna/generated/location.hh
|
|
|
|
$(COMPILE) $(ELNA_INCLUDES) $<
|
|
|
|
$(POSTCOMPILE)
|
2024-12-23 13:54:11 +01:00
|
|
|
|
2024-12-30 23:12:47 +01:00
|
|
|
elna/%.o: elna/generated/%.cc elna/generated/parser.hh elna/generated/location.hh
|
2024-12-23 13:54:11 +01:00
|
|
|
$(COMPILE) $(ELNA_INCLUDES) $<
|
|
|
|
$(POSTCOMPILE)
|
|
|
|
|
2024-12-30 23:12:47 +01:00
|
|
|
elna/%.o: elna/gcc/%.cc elna/generated/parser.hh elna/generated/location.hh
|
2024-12-23 13:54:11 +01:00
|
|
|
$(COMPILE) $(ELNA_INCLUDES) $<
|
|
|
|
$(POSTCOMPILE)
|
2024-12-30 23:12:47 +01:00
|
|
|
|
|
|
|
elna/generated/parser.cc: elna/source/parser.yy
|
|
|
|
mkdir -p $(dir $@)
|
|
|
|
$(BISON) -d -o $@ $<
|
|
|
|
|
|
|
|
elna/generated/parser.hh elna/generated/location.hh: elna/generated/parser.cc
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
elna/generated/lexer.cc: elna/source/lexer.ll
|
|
|
|
mkdir -p $(dir $@)
|
|
|
|
$(FLEX) -o $@ $<
|