* Makefile.def (host_modules): Add cgen.
[binutils.git] / binutils / makefile.vms-in
blob8e597c933df7ecd0f73b8dc8e9184e46fd56f7cc
2 # Makefile for binutils under openVMS (Alpha and Vax)
4 # For use with gnu-make for vms
6 # Created by Klaus K"ampf, kkaempf@rmi.de
10 # Distribution version, filled in by configure.com
11 VERSION=@VERSION@
13 ifeq ($(CC),gcc)
14 DEFS=
15 CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
16 LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj
17 else
18 DEFS=
19 OPT=/noopt/debug
20 CFLAGS=$(OPT)/include=([],[-.include],[-.bfd])$(DEFS)\
21  /name=(as_is,shortened)\
22  /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
23 LIBS=,sys$$library:vaxcrtl.olb/lib
24 endif
26 BFDLIB = [-.bfd]libbfd.olb/lib
27 BFDLIB_DEP = [-.bfd]libbfd.olb
28 LIBIBERTY_DEP = [-.libiberty]libiberty.olb
29 LIBIBERTY = [-.libiberty]libiberty.olb/lib
30 OPCODES_DEP = [-.opcodes]libopcodes.olb
31 OPCODES = [-.opcodes]libopcodes.olb/lib
33 DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj
35 WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj
37 BULIBS = []bucomm.obj,version.obj,filemode.obj
39 ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP)
40 ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY)
42 SIZEOBJS = $(ADDL_DEPS),size.obj
44 STRINGSOBJS = $(ADDL_DEPS),strings.obj
46 NMOBJS = $(ADDL_DEPS),nm.obj
48 ADDR2LINEOBJS = $(ADDL_DEPS),addr2line.obj
50 OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP)
52 all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe
54 size.exe: $(SIZEOBJS)
55         link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
57 strings.exe: $(STRINGSOBJS)
58         link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
60 nm.exe: $(NMOBJS)
61         link/exe=$@ nm.obj,$(ADDL_LIBS)$(LIBS)
63 addr2line.exe: $(ADDR2LINEOBJS)
64         link/exe=$@ addr2line.obj,$(ADDL_LIBS)$(LIBS)
66 objdump.exe: $(OBJDUMPOBJS)
67         link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS)
69 config.h:
70         $$ @configure
71         $(MAKE) -f makefile.vms "CC=$(CC)"
73 [-.bfd]libbfd.olb:
74         $(CD) [-.bfd]
75         $(MAKE) -f makefile.vms "CC=$(CC)"
76         $(CD) [-.binutils]
78 [-.libiberty]libiberty.olb:
79         $(CD) [-.libiberty]
80         $(MAKE) -f makefile.vms "CC=$(CC)"
81         $(CD) [-.binutils]
83 [-.opcodes]libopcodes.olb:
84         $(CD) [-.opcodes]
85         $(MAKE) -f makefile.vms "CC=$(CC)"
86         $(CD) [-.binutils]
88 clean:
89         $$ purge
90         $(RM) *.obj;
91         $(RM) *.exe;
93 distclean: clean
94         $(RM) config.h;
95         $(RM) makefile.vms;