Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | # |
2 | # Makefile for binutils under openVMS (Alpha and Vax) | |
3 | # | |
4 | # For use with gnu-make for vms | |
5 | # | |
6 | # Created by Klaus K"ampf, kkaempf@rmi.de | |
7 | # | |
8 | # | |
9 | ||
10 | # Distribution version, filled in by configure.com | |
11 | VERSION=@VERSION@ | |
12 | ||
252b5132 | 13 | ifeq ($(CC),gcc) |
c5ac1056 | 14 | DEFS= |
252b5132 | 15 | CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS) |
252b5132 RH |
16 | LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj |
17 | else | |
c5ac1056 TG |
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")) | |
252b5132 RH |
23 | LIBS=,sys$$library:vaxcrtl.olb/lib |
24 | endif | |
25 | ||
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 | |
32 | ||
d387240a | 33 | DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj |
252b5132 RH |
34 | |
35 | WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj | |
36 | ||
37 | BULIBS = []bucomm.obj,version.obj,filemode.obj | |
38 | ||
39 | ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP) | |
40 | ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY) | |
41 | ||
42 | SIZEOBJS = $(ADDL_DEPS),size.obj | |
43 | ||
44 | STRINGSOBJS = $(ADDL_DEPS),strings.obj | |
45 | ||
46 | NMOBJS = $(ADDL_DEPS),nm.obj | |
47 | ||
c5ac1056 TG |
48 | ADDR2LINEOBJS = $(ADDL_DEPS),addr2line.obj |
49 | ||
252b5132 RH |
50 | OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP) |
51 | ||
c5ac1056 | 52 | all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe |
252b5132 RH |
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 | ||
c5ac1056 TG |
63 | addr2line.exe: $(ADDR2LINEOBJS) |
64 | link/exe=$@ addr2line.obj,$(ADDL_LIBS)$(LIBS) | |
65 | ||
252b5132 RH |
66 | objdump.exe: $(OBJDUMPOBJS) |
67 | link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS) | |
68 | ||
252b5132 RH |
69 | config.h: |
70 | $$ @configure | |
71 | $(MAKE) -f makefile.vms "CC=$(CC)" | |
72 | ||
73 | [-.bfd]libbfd.olb: | |
74 | $(CD) [-.bfd] | |
75 | $(MAKE) -f makefile.vms "CC=$(CC)" | |
76 | $(CD) [-.binutils] | |
77 | ||
78 | [-.libiberty]libiberty.olb: | |
79 | $(CD) [-.libiberty] | |
80 | $(MAKE) -f makefile.vms "CC=$(CC)" | |
81 | $(CD) [-.binutils] | |
82 | ||
83 | [-.opcodes]libopcodes.olb: | |
84 | $(CD) [-.opcodes] | |
85 | $(MAKE) -f makefile.vms "CC=$(CC)" | |
86 | $(CD) [-.binutils] | |
87 | ||
88 | clean: | |
89 | $$ purge | |
90 | $(RM) *.obj; | |
91 | $(RM) *.exe; | |
92 | ||
93 | distclean: clean | |
94 | $(RM) config.h; | |
95 | $(RM) makefile.vms; |