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