Home | History | Annotate | Download | only in binutils
      1 #
      2 # Makefile for binutils under openVMS (Alpha and Itanium)
      3 #
      4 # For use with gnu-make for vms
      5 #
      6 # Created by Klaus Kaempf, kkaempf (at] rmi.de
      7 #
      8 #   Copyright (C) 2012-2014 Free Software Foundation, Inc.
      9 #
     10 # This file is free software; you can redistribute it and/or modify
     11 # it under the terms of the GNU General Public License as published by
     12 # the Free Software Foundation; either version 3 of the License, or
     13 # (at your option) any later version.
     14 # 
     15 # This program is distributed in the hope that it will be useful,
     16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18 # GNU General Public License for more details.
     19 # 
     20 # You should have received a copy of the GNU General Public License
     21 # along with this program; see the file COPYING3.  If not see
     22 # <http://www.gnu.org/licenses/>.
     23 #
     24 
     25 DEFS=/define=("OBJDUMP_PRIVATE_VECTORS=")
     26 OPT=/noopt/debug
     27 CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\
     28  /name=(as_is,shortened)\
     29  /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))\
     30  /warns=(info=(ptrmismatch,shiftcount))
     31 
     32 LIBBFD = [-.bfd]libbfd.olb/lib
     33 LIBBFD_DEP = [-.bfd]libbfd.olb
     34 LIBIBERTY_DEP = [-.libiberty]libiberty.olb
     35 LIBIBERTY = [-.libiberty]libiberty.olb/lib
     36 OPCODES_DEP = [-.opcodes]libopcodes.olb
     37 OPCODES = [-.opcodes]libopcodes.olb/lib
     38 
     39 DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj,\
     40   elfcomm.obj
     41 
     42 BULIBS = bucomm.obj,version.obj,filemode.obj
     43 
     44 ADDL_DEPS = $(BULIBS),$(LIBBFD_DEP),$(LIBIBERTY_DEP)
     45 ADDL_LIBS = $(BULIBS),$(LIBBFD),$(LIBIBERTY)
     46 
     47 SIZEOBJS = $(ADDL_DEPS),size.obj
     48 
     49 STRINGSOBJS = $(ADDL_DEPS),strings.obj
     50 
     51 NMOBJS = $(ADDL_DEPS),nm.obj
     52 
     53 ADDR2LINEOBJS = $(ADDL_DEPS),addr2line.obj
     54 
     55 OBJDUMPOBJS = objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(ADDL_DEPS),$(OPCODES_DEP)
     56 
     57 READELFOBJS = readelf.obj,dwarf.obj,unwind-ia64.obj,$(ADDL_DEPS)
     58 
     59 all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe
     60 
     61 size.exe: $(SIZEOBJS)
     62 	link/exe=$@ size.obj,$(ADDL_LIBS)
     63 
     64 strings.exe: $(STRINGSOBJS)
     65 	link/exe=$@ strings.obj,$(ADDL_LIBS)
     66 
     67 nm.exe: $(NMOBJS)
     68 	link/exe=$@ nm.obj,$(ADDL_LIBS)
     69 
     70 addr2line.exe: $(ADDR2LINEOBJS)
     71 	link/exe=$@ addr2line.obj,$(ADDL_LIBS)
     72 
     73 objdump.exe: $(OBJDUMPOBJS)
     74 	link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(ADDL_LIBS),$(OPCODES)
     75 
     76 readelf.exe: $(READELFOBJS)
     77 	link/exe=$@ readelf.obj,dwarf.obj,unwind-ia64.obj,$(ADDL_LIBS)
     78 
     79 config.h:
     80 	$$ @configure
     81 	$(MAKE) -f makefile.vms "CC=$(CC)"
     82 
     83 clean:
     84 	$$ purge
     85 	$(RM) *.obj;
     86 	$(RM) *.exe;
     87 
     88 distclean: clean
     89 	$(RM) config.h;
     90 	$(RM) makefile.vms;
     91