opcodes/
[binutils-gdb.git] / binutils / makefile.vms-in
blob1b593f40608146abd641caccb433b7033e39f788
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 ($(ARCH),ALPHA)
14 TARGET=""vms-alpha""
15 else
16 TARGET=""vms-vax""
17 endif
19 ifeq ($(CC),gcc)
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
23 else
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
30 endif
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
58 size.exe: $(SIZEOBJS)
59         link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
61 strings.exe: $(STRINGSOBJS)
62         link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
64 nm.exe: $(NMOBJS)
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)""") $<
74 config.h:
75         $$ @configure
76         $(MAKE) -f makefile.vms "CC=$(CC)"
78 [-.bfd]libbfd.olb:
79         $(CD) [-.bfd]
80         $(MAKE) -f makefile.vms "CC=$(CC)"
81         $(CD) [-.binutils]
83 [-.libiberty]libiberty.olb:
84         $(CD) [-.libiberty]
85         $(MAKE) -f makefile.vms "CC=$(CC)"
86         $(CD) [-.binutils]
88 [-.opcodes]libopcodes.olb:
89         $(CD) [-.opcodes]
90         $(MAKE) -f makefile.vms "CC=$(CC)"
91         $(CD) [-.binutils]
93 clean:
94         $$ purge
95         $(RM) *.obj;
96         $(RM) *.exe;
98 distclean: clean
99         $(RM) config.h;
100         $(RM) makefile.vms;