Mail Archives: djgpp-workers/2000/11/19/04:08:54
> ---------Start makefile-----------------------------
> AS := $(DJDIR)/bin/as
> GAS_VERSION := $(subst ., ,$(shell $(AS) --version))
Just a minor caveat: it is possible a user has as.exe in $DJDIR/lib/gcc-lib/2.95.2/, so a test similar to the one for ld.exe may be required in order for optimum compatibility.
Note that you may want to include the compiler flags, as they can affect the path searched by gcc (notably -B, -b, -m (for multilib) and -V can have this effect). These will not usually be used when building DJGPP, but we might as well support their use).
AS := $(shell $(CROSS_GCC) $(GCC_OPT) -print-prog-name=as)
AS := $(subst \,/,$(AS))
LD := $(shell $(CROSS_GCC) $(GCC_OPT) -print-prog-name=ld)
LD := $(subst \,/,$(LD))
ifeq ($(LIBGCCA),)
LIBGCCA := $(shell $(CROSS_GCC) $(GCC_OPT) -print-file-name=libgcc.a)
LIBGCCA := $(subst \,/,$(LIBGCCA))
export LIBGCCA
endif
ifeq ($(DJGPP_DJL),)
DJGPP_DJL := $(shell $(CROSS_GCC) $(GCC_OPT) -print-file-name=djgpp.djl)
# Handle systems without djgpp.djl (recent binutils don't need it)
ifneq ($(DJGPP_DJL),djgpp.djl)
DJGPP_DJL := -T $(subst \,/,$(DJGPP_DJL))
else
DJGPP_DJL :=
endif
export DJGPP_DJL
endif
- Raw text -