Wed May 6 15:28:51 1998 Klaus Kaempf <kkaempf@progis.de>
[external/binutils.git] / binutils / makefile.vms
1 #
2 # Makefile for binutils under openVMS/Alpha
3 #
4 # For use with gnu-make for vms
5 #
6 # Created by Klaus K"ampf, kkaempf@progis.de
7 #
8 #
9
10 # Distribution version, filled in by configure.com
11 VERSION=
12
13 TARGET=""evax-alpha""
14
15 ifeq ($(CC),gcc)
16 CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
17 DEFS=/define=("TARGET=$(TARGET)")
18 LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj
19 else
20 CFLAGS=/noopt/nodebug/include=([],[-.include],[-.bfd])$(DEFS)/warnings=disable=(missingreturn,implicitfunc)
21 DEFS=/define=("TARGET=$(TARGET)",\
22 "const=","unlink=remove",\
23 "_bfd_generic_get_section_contents_in_window"="_bfd_generic_get_win_section_cont",\
24 "_bfd_elf_section_from_bfd_section"="_bfd_elf_sec_from_bfd_sec")
25 LIBS=,sys$$library:vaxcrtl.olb/lib
26 endif
27
28 BFDLIB = [-.bfd]libbfd.olb/lib
29 BFDLIB_DEP = [-.bfd]libbfd.olb
30 LIBIBERTY_DEP = [-.libiberty]libiberty.olb
31 LIBIBERTY = [-.libiberty]libiberty.olb/lib
32 OPCODES_DEP = [-.opcodes]libopcodes.olb
33 OPCODES = [-.opcodes]libopcodes.olb/lib
34
35 DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj
36
37 WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj
38
39 BULIBS = []bucomm.obj,version.obj,filemode.obj
40
41 ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP)
42 ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY)
43
44 SIZEOBJS = $(ADDL_DEPS),size.obj
45
46 STRINGSOBJS = $(ADDL_DEPS),strings.obj
47
48 NMOBJS = $(ADDL_DEPS),nm.obj
49
50 OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP)
51
52 all: config.h size.exe strings.exe objdump.exe nm.exe
53
54 size.exe: $(SIZEOBJS)
55         link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
56
57 strings.exe: $(STRINGSOBJS)
58         link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
59
60 nm.exe: $(NMOBJS)
61         link/exe=$@ nm.obj,$(ADDL_LIBS)$(LIBS)
62
63 objdump.exe: $(OBJDUMPOBJS)
64         link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS)
65
66
67 version.obj: version.c
68         $(CC) $(CFLAGS)/define=(VERSION="""$(VERSION)""") $<
69
70 config.h:
71         $$ @configure
72         $(MAKE) -f makefile.vms "CC=$(CC)"
73
74 [-.bfd]libbfd.olb:
75         $(CD) [-.bfd]
76         $(MAKE) -f makefile.vms "CC=$(CC)"
77         $(CD) [-.binutils]
78
79 [-.libiberty]libiberty.olb:
80         $(CD) [-.libiberty]
81         $(MAKE) -f makefile.vms "CC=$(CC)"
82         $(CD) [-.binutils]
83
84 [-.opcodes]libopcodes.olb:
85         $(CD) [-.opcodes]
86         $(MAKE) -f makefile.vms "CC=$(CC)"
87         $(CD) [-.binutils]
88
89 clean:
90         $$ purge
91         $(RM) *.obj;
92         $(RM) *.exe;
93         $(RM) config.h;