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 | ||
252b5132 | 10 | ifeq ($(CC),gcc) |
c5ac1056 | 11 | DEFS= |
252b5132 | 12 | CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS) |
252b5132 RH |
13 | LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj |
14 | else | |
c5ac1056 TG |
15 | DEFS= |
16 | OPT=/noopt/debug | |
e06ae0d4 | 17 | CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\ |
c5ac1056 | 18 | /name=(as_is,shortened)\ |
6cdb8d82 TG |
19 | /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))\ |
20 | /warns=(info=(ptrmismatch,shiftcount)) | |
252b5132 RH |
21 | endif |
22 | ||
e06ae0d4 TG |
23 | LIBBFD = [-.bfd]libbfd.olb/lib |
24 | LIBBFD_DEP = [-.bfd]libbfd.olb | |
252b5132 RH |
25 | LIBIBERTY_DEP = [-.libiberty]libiberty.olb |
26 | LIBIBERTY = [-.libiberty]libiberty.olb/lib | |
27 | OPCODES_DEP = [-.opcodes]libopcodes.olb | |
28 | OPCODES = [-.opcodes]libopcodes.olb/lib | |
29 | ||
083faca9 TG |
30 | DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj,\ |
31 | elfcomm.obj | |
252b5132 | 32 | |
e06ae0d4 | 33 | BULIBS = bucomm.obj,version.obj,filemode.obj |
252b5132 | 34 | |
e06ae0d4 TG |
35 | ADDL_DEPS = $(BULIBS),$(LIBBFD_DEP),$(LIBIBERTY_DEP) |
36 | ADDL_LIBS = $(BULIBS),$(LIBBFD),$(LIBIBERTY) | |
252b5132 RH |
37 | |
38 | SIZEOBJS = $(ADDL_DEPS),size.obj | |
39 | ||
40 | STRINGSOBJS = $(ADDL_DEPS),strings.obj | |
41 | ||
42 | NMOBJS = $(ADDL_DEPS),nm.obj | |
43 | ||
c5ac1056 TG |
44 | ADDR2LINEOBJS = $(ADDL_DEPS),addr2line.obj |
45 | ||
d3408916 | 46 | OBJDUMPOBJS = objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(ADDL_DEPS),$(OPCODES_DEP) |
252b5132 | 47 | |
c5ac1056 | 48 | all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe |
252b5132 RH |
49 | |
50 | size.exe: $(SIZEOBJS) | |
e06ae0d4 | 51 | link/exe=$@ size.obj,$(ADDL_LIBS) |
252b5132 RH |
52 | |
53 | strings.exe: $(STRINGSOBJS) | |
e06ae0d4 | 54 | link/exe=$@ strings.obj,$(ADDL_LIBS) |
252b5132 RH |
55 | |
56 | nm.exe: $(NMOBJS) | |
e06ae0d4 | 57 | link/exe=$@ nm.obj,$(ADDL_LIBS) |
252b5132 | 58 | |
c5ac1056 | 59 | addr2line.exe: $(ADDR2LINEOBJS) |
e06ae0d4 | 60 | link/exe=$@ addr2line.obj,$(ADDL_LIBS) |
c5ac1056 | 61 | |
252b5132 | 62 | objdump.exe: $(OBJDUMPOBJS) |
d3408916 | 63 | link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(ADDL_LIBS),$(LIBBFD),$(OPCODES) |
252b5132 | 64 | |
252b5132 RH |
65 | config.h: |
66 | $$ @configure | |
67 | $(MAKE) -f makefile.vms "CC=$(CC)" | |
68 | ||
252b5132 RH |
69 | clean: |
70 | $$ purge | |
71 | $(RM) *.obj; | |
72 | $(RM) *.exe; | |
73 | ||
74 | distclean: clean | |
75 | $(RM) config.h; | |
76 | $(RM) makefile.vms; |