Commit | Line | Data |
---|---|---|
e10a4fc4 | 1 | # |
c05a9b33 | 2 | # Makefile for binutils under openVMS/Alpha |
e10a4fc4 ILT |
3 | # |
4 | # For use with gnu-make for vms | |
5 | # | |
c05a9b33 | 6 | # Created by Klaus K"ampf, kkaempf@progis.de |
e10a4fc4 ILT |
7 | # |
8 | # | |
9 | ||
e72afe26 ILT |
10 | # Distribution version, filled in by configure.com |
11 | VERSION= | |
12 | ||
13 | TARGET=""evax-alpha"" | |
14 | ||
e10a4fc4 | 15 | ifeq ($(CC),gcc) |
e72afe26 ILT |
16 | CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS) |
17 | DEFS=/define=("TARGET=$(TARGET)") | |
18 | LIBS=,GNU:[000000]libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU:[000000]crt0.obj | |
e10a4fc4 | 19 | else |
2a774ae9 | 20 | CFLAGS=/noopt/debug/include=([],[-.include],[-.bfd])$(DEFS)/warnings=disable=(missingreturn,implicitfunc) |
e72afe26 ILT |
21 | DEFS=/define=("TARGET=$(TARGET)",\ |
22 | "const=","unlink=remove",\ | |
e10a4fc4 ILT |
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") | |
2a774ae9 | 25 | LIBS=,sys$$library:vaxcrtl.olb/lib |
e10a4fc4 ILT |
26 | endif |
27 | ||
2a774ae9 ILT |
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 | |
e10a4fc4 | 34 | |
2a774ae9 | 35 | DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj |
e10a4fc4 | 36 | |
2a774ae9 | 37 | WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj |
e10a4fc4 | 38 | |
2a774ae9 | 39 | BULIBS = []bucomm.obj,version.obj,filemode.obj |
e10a4fc4 | 40 | |
2a774ae9 ILT |
41 | ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP) |
42 | ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY) | |
e10a4fc4 | 43 | |
2a774ae9 | 44 | SIZEOBJS = $(ADDL_DEPS),size.obj |
e10a4fc4 | 45 | |
2a774ae9 | 46 | STRINGSOBJS = $(ADDL_DEPS),strings.obj |
e10a4fc4 | 47 | |
2a774ae9 | 48 | NMOBJS = $(ADDL_DEPS),nm.obj |
e10a4fc4 | 49 | |
2a774ae9 | 50 | OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP) |
e10a4fc4 | 51 | |
2a774ae9 | 52 | all: config.h size.exe strings.exe objdump.exe nm.exe |
e10a4fc4 | 53 | |
2a774ae9 ILT |
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) | |
e10a4fc4 | 62 | |
2a774ae9 ILT |
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 | |
e72afe26 ILT |
68 | $(CC) $(CFLAGS)/define=(VERSION="""$(VERSION)""") $< |
69 | ||
70 | config.h: | |
71 | $$ @configure | |
72 | $(MAKE) -f makefile.vms | |
73 | ||
74 | [-.bfd]libbfd.olb: | |
75 | $(CD) [-.bfd] | |
76 | $(MAKE) -f makefile.vms | |
77 | $(CD) [-.binutils] | |
78 | ||
79 | [-.libiberty]libiberty.olb: | |
80 | $(CD) [-.libiberty] | |
81 | $(MAKE) -f makefile.vms | |
82 | $(CD) [-.binutils] | |
83 | ||
84 | [-.opcodes]libopcodes.olb: | |
85 | $(CD) [-.opcodes] | |
86 | $(MAKE) -f makefile.vms | |
87 | $(CD) [-.binutils] | |
88 | ||
89 | clean: | |
90 | $$ purge | |
91 | $(RM) *.obj; | |
92 | $(RM) *.exe; | |
93 | $(RM) config.h; |