2003-12-03 Alexandre Oliva <aoliva@redhat.com>
[binutils.git] / binutils / makefile.vms-in
bloba809d1b13cd49bbf19010bce69abc65c975b0247
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 /warnings=disable=(missingreturn,implicitfunc,longextern)
26 DEFS=/define=("TARGET=$(TARGET)","const=","unlink=remove")
27 LIBS=,sys$$library:vaxcrtl.olb/lib
28 endif
30 BFDLIB = [-.bfd]libbfd.olb/lib
31 BFDLIB_DEP = [-.bfd]libbfd.olb
32 LIBIBERTY_DEP = [-.libiberty]libiberty.olb
33 LIBIBERTY = [-.libiberty]libiberty.olb/lib
34 OPCODES_DEP = [-.opcodes]libopcodes.olb
35 OPCODES = [-.opcodes]libopcodes.olb/lib
37 DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj
39 WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj
41 BULIBS = []bucomm.obj,version.obj,filemode.obj
43 ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP)
44 ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY)
46 SIZEOBJS = $(ADDL_DEPS),size.obj
48 STRINGSOBJS = $(ADDL_DEPS),strings.obj
50 NMOBJS = $(ADDL_DEPS),nm.obj
52 OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP)
54 all: config.h size.exe strings.exe objdump.exe nm.exe
56 size.exe: $(SIZEOBJS)
57         link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
59 strings.exe: $(STRINGSOBJS)
60         link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
62 nm.exe: $(NMOBJS)
63         link/exe=$@ nm.obj,$(ADDL_LIBS)$(LIBS)
65 objdump.exe: $(OBJDUMPOBJS)
66         link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS)
69 version.obj: version.c
70         $(CC) $(CFLAGS)/define=(VERSION="""$(VERSION)""") $<
72 config.h:
73         $$ @configure
74         $(MAKE) -f makefile.vms "CC=$(CC)"
76 [-.bfd]libbfd.olb:
77         $(CD) [-.bfd]
78         $(MAKE) -f makefile.vms "CC=$(CC)"
79         $(CD) [-.binutils]
81 [-.libiberty]libiberty.olb:
82         $(CD) [-.libiberty]
83         $(MAKE) -f makefile.vms "CC=$(CC)"
84         $(CD) [-.binutils]
86 [-.opcodes]libopcodes.olb:
87         $(CD) [-.opcodes]
88         $(MAKE) -f makefile.vms "CC=$(CC)"
89         $(CD) [-.binutils]
91 clean:
92         $$ purge
93         $(RM) *.obj;
94         $(RM) *.exe;
96 distclean: clean
97         $(RM) config.h;
98         $(RM) makefile.vms;