2009-07-02 Tristan Gingold <gingold@adacore.com>
[binutils.git] / bfd / makefile.vms
blobbebb8e9da08484991b34c07d550ac47454dda7e2
2 # Makefile for bfd library under openVMS (Alpha and Vax)
4 # For use with gnu-make for vms
6 # Created by Klaus K"ampf, kkaempf@rmi.de
10 CC=cc
12 ifeq ($(ARCH),ALPHA)
13 HOSTFILE=alphavms.h
14 TARGETOBJS = cpu-alpha.obj
15 else
16 HOSTFILE=vaxvms.h
17 TARGETOBJS = cpu-vax.obj
18 endif
21 OBJS=archive.obj,archive64.obj,archures.obj,bfd.obj,bfdio.obj,binary.obj,\
22   cache.obj,coffgen.obj,compress.obj,corefile.obj,dwarf2.obj,elf.obj,\
23   format.obj,hash.obj,ihex.obj,init.obj,libbfd.obj,linker.obj,opncls.obj,\
24   reloc.obj,section.obj,simple.obj,srec.obj,stab-syms.obj,syms.obj,\
25   targets.obj,tekhex.obj,verilog.obj,\
26   vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,$(TARGETOBJS)
28 ifeq ($(CC),gcc)
29 ifeq ($(ARCH),ALPHA)
30 DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\
31 "HAVE_vms_alpha_vec=1")
32 else
33 DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
34 "HAVE_vms_vax_vec=1")
35 endif
36 CFLAGS=/include=([],[-.include])$(DEFS)
37 else
38 ifeq ($(ARCH),ALPHA)
39 DEFS=/define=(SELECT_VECS="&vms_alpha_vec",\
40   SELECT_ARCHITECTURES="&bfd_alpha_arch",\
41   "HAVE_vms_alpha_vec=1","unlink=remove","DEBUGDIR=NULL")
42 else
43 DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
44   "HAVE_vms_vax_vec=1","unlink=remove")
45 endif
46 OPT=/noopt/debug
47 CFLAGS=/name=(as_is,shortened)/include=([],[-.include])$(DEFS)$(OPT)
48 endif
51 libbfd.olb: sysdep.h bfd.h $(OBJS)
52         purge
53         lib/create libbfd $(OBJS)
55 sysdep.h: [.hosts]$(HOSTFILE) config.h
56         $(CP) $< $@
58 bfd.h: bfd-in2.h
59         $$ @configure
61 targmatch.h: bfd.h
62 config.h: bfd.h
64 vms.c: vms.h
65 vms-mhd.c: vms.h
66 vms-gsd.c: vms.h
67 vms-tir.c: vms.h
68 vms-misc.c: vms.h
69 targets.c: targmatch.h
71 clean:
72         $$ purge
73         $(RM) libbfd.olb;
74         $(RM) sysdep.h;
75         $(RM) bfd.h;
76         $(RM) targmatch.h;
77         $(RM) config.h;
78         $(RM) *.obj;