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
20 CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
21 DEFS=/define=("TARGET=$(TARGET)")
22 LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj
24 CFLAGS=/noopt/debug/include=([],[-.include],[-.bfd])$(DEFS)\
25 /name=(as_is,shortened)\
26 /warnings=disable=(missingreturn,longextern)\
27 /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
28 DEFS=/define=("TARGET=$(TARGET)","const=","unlink=remove")
29 LIBS=,sys$$library:vaxcrtl.olb/lib
32 BFDLIB = [-.bfd]libbfd.olb/lib
33 BFDLIB_DEP = [-.bfd]libbfd.olb
34 LIBIBERTY_DEP = [-.libiberty]libiberty.olb
35 LIBIBERTY = [-.libiberty]libiberty.olb/lib
36 OPCODES_DEP = [-.opcodes]libopcodes.olb
37 OPCODES = [-.opcodes]libopcodes.olb/lib
39 DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj
41 WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj
43 BULIBS = []bucomm.obj,version.obj,filemode.obj
45 ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP)
46 ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY)
48 SIZEOBJS = $(ADDL_DEPS),size.obj
50 STRINGSOBJS = $(ADDL_DEPS),strings.obj
52 NMOBJS = $(ADDL_DEPS),nm.obj
54 OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP)
56 all: config.h size.exe strings.exe objdump.exe nm.exe
59 link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
61 strings.exe: $(STRINGSOBJS)
62 link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
65 link/exe=$@ nm.obj,$(ADDL_LIBS)$(LIBS)
67 objdump.exe: $(OBJDUMPOBJS)
68 link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS)
71 version.obj: version.c
72 $(CC) $(CFLAGS)/define=(VERSION="""$(VERSION)""") $<
76 $(MAKE) -f makefile.vms "CC=$(CC)"
80 $(MAKE) -f makefile.vms "CC=$(CC)"
83 [-.libiberty]libiberty.olb:
85 $(MAKE) -f makefile.vms "CC=$(CC)"
88 [-.opcodes]libopcodes.olb:
90 $(MAKE) -f makefile.vms "CC=$(CC)"