#
|
#
|
# Makefile for bfd library under openVMS (Alpha and Vax)
|
# Makefile for bfd library under openVMS (Alpha and Vax)
|
#
|
#
|
# For use with gnu-make for vms
|
# For use with gnu-make for vms
|
#
|
#
|
# Created by Klaus K"ampf, kkaempf@rmi.de
|
# Created by Klaus K"ampf, kkaempf@rmi.de
|
#
|
#
|
#
|
#
|
|
|
CC=cc
|
CC=cc
|
|
|
ifeq ($(ARCH),ALPHA)
|
ifeq ($(ARCH),ALPHA)
|
HOSTFILE=alphavms.h
|
HOSTFILE=alphavms.h
|
TARGETOBJS = cpu-alpha.obj
|
TARGETOBJS = cpu-alpha.obj
|
else
|
else
|
HOSTFILE=vaxvms.h
|
HOSTFILE=vaxvms.h
|
TARGETOBJS = cpu-vax.obj
|
TARGETOBJS = cpu-vax.obj
|
endif
|
endif
|
|
|
|
|
OBJS=archive.obj,archures.obj,bfd.obj,cache.obj,coffgen.obj,corefile.obj,\
|
OBJS=archive.obj,archures.obj,bfd.obj,cache.obj,coffgen.obj,corefile.obj,\
|
format.obj,init.obj,libbfd.obj,opncls.obj,reloc.obj,section.obj,syms.obj,\
|
format.obj,init.obj,libbfd.obj,opncls.obj,reloc.obj,section.obj,syms.obj,\
|
targets.obj,hash.obj,linker.obj,elf.obj,srec.obj,binary.obj,tekhex.obj,\
|
targets.obj,hash.obj,linker.obj,elf.obj,srec.obj,binary.obj,tekhex.obj,\
|
ihex.obj,stab-syms.obj,vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,\
|
ihex.obj,stab-syms.obj,vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,\
|
vms-misc.obj,$(TARGETOBJS)
|
vms-misc.obj,$(TARGETOBJS)
|
|
|
ifeq ($(CC),gcc)
|
ifeq ($(CC),gcc)
|
ifeq ($(ARCH),ALPHA)
|
ifeq ($(ARCH),ALPHA)
|
DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\
|
DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\
|
"HAVE_vms_alpha_vec=1")
|
"HAVE_vms_alpha_vec=1")
|
else
|
else
|
DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
|
DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
|
"HAVE_vms_vax_vec=1","VMS_DEBUG")
|
"HAVE_vms_vax_vec=1","VMS_DEBUG")
|
endif
|
endif
|
CFLAGS=/include=([],[-.include])$(DEFS)
|
CFLAGS=/include=([],[-.include])$(DEFS)
|
else
|
else
|
ifeq ($(ARCH),ALPHA)
|
ifeq ($(ARCH),ALPHA)
|
DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\
|
DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\
|
"HAVE_vms_alpha_vec=1","unlink=remove","const=","VMS_DEBUG",)
|
"HAVE_vms_alpha_vec=1","unlink=remove","const=","VMS_DEBUG",)
|
else
|
else
|
DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
|
DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
|
"HAVE_vms_vax_vec=1","unlink=remove","const=","VMS_DEBUG")
|
"HAVE_vms_vax_vec=1","unlink=remove","const=","VMS_DEBUG")
|
endif
|
endif
|
CFLAGS=/noopt/debug/include=([],[-.include])$(DEFS)/warnings=disable=(missingreturn,implicitfunc,longextern)
|
CFLAGS=/noopt/debug/include=([],[-.include])$(DEFS)/warnings=disable=(missingreturn,implicitfunc,longextern)
|
endif
|
endif
|
|
|
|
|
libbfd.olb: sysdep.h bfd.h $(OBJS)
|
libbfd.olb: sysdep.h bfd.h $(OBJS)
|
purge
|
purge
|
lib/create libbfd $(OBJS)
|
lib/create libbfd $(OBJS)
|
|
|
sysdep.h: [.hosts]$(HOSTFILE) config.h
|
sysdep.h: [.hosts]$(HOSTFILE) config.h
|
$(CP) $< $@
|
$(CP) $< $@
|
|
|
bfd.h: bfd-in2.h
|
bfd.h: bfd-in2.h
|
$$ @configure
|
$$ @configure
|
|
|
targmatch.h: bfd.h
|
targmatch.h: bfd.h
|
config.h: bfd.h
|
config.h: bfd.h
|
|
|
vms.c: vms.h
|
vms.c: vms.h
|
vms-mhd.c: vms.h
|
vms-mhd.c: vms.h
|
vms-gsd.c: vms.h
|
vms-gsd.c: vms.h
|
vms-tir.c: vms.h
|
vms-tir.c: vms.h
|
vms-misc.c: vms.h
|
vms-misc.c: vms.h
|
targets.c: targmatch.h
|
targets.c: targmatch.h
|
|
|
clean:
|
clean:
|
$$ purge
|
$$ purge
|
$(RM) libbfd.olb;
|
$(RM) libbfd.olb;
|
$(RM) sysdep.h;
|
$(RM) sysdep.h;
|
$(RM) bfd.h;
|
$(RM) bfd.h;
|
$(RM) targmatch.h;
|
$(RM) targmatch.h;
|
$(RM) config.h;
|
$(RM) config.h;
|
$(RM) *.obj;
|
$(RM) *.obj;
|
|
|