makefile.vms 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # makefile for gas
  3. #
  4. # Created by Klaus Kaempf, kkaempf@progis.de
  5. #
  6. # Copyright (C) 2012-2022 Free Software Foundation, Inc.
  7. #
  8. # This file is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; see the file COPYING3. If not see
  20. # <http://www.gnu.org/licenses/>.
  21. #
  22. #CC=gcc
  23. CC=cc
  24. ifeq ($(CC),gcc)
  25. DEFS=
  26. CFLAGS=/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)
  27. LFLAGS=
  28. LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj
  29. else
  30. #DEFS=/define=("VMS_DEBUG","DEBUG2","DEBUG3","DEBUG5","DEBUG_SYMS","DEBUG_ALPHA")
  31. OPT=/noopt/debug
  32. CFLAGS=/names=(as_is,shortened)\
  33. /include=([],[-.bfd],[.config],"../include","../")$(DEFS)$(OPT)\
  34. /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
  35. #LFLAGS=/debug/map=as.map
  36. endif
  37. OBJS:=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,\
  38. atof-generic.obj,cond.obj,compress-debug.obj,depend.obj,expr.obj,\
  39. flonum-konst.obj,flonum-copy.obj,flonum-mult.obj,\
  40. frags.obj,hash.obj,input-file.obj,\
  41. input-scrub.obj,literal.obj,messages.obj,output-file.obj,read.obj,\
  42. subsegs.obj,symbols.obj,write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,\
  43. macro.obj,ehopt.obj,dw2gencfi.obj,dwarf2dbg.obj,remap.obj
  44. ifeq ($(ARCH),IA64)
  45. OBJS:=$(OBJS),te-vms.obj
  46. endif
  47. LIBIBERTY = [-.libiberty]libiberty.olb
  48. LIBBFD = [-.bfd]libbfd.olb
  49. LIBOPCODES = [-.opcodes]libopcodes.olb
  50. all: as.exe
  51. as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY)
  52. link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
  53. ifneq ($(CC),gcc)
  54. # Work-around a DEC-C bug.
  55. targ-cpu.obj: targ-cpu.c targ-cpu.h
  56. $(COMPILE.c) /noopt/obj=$@ $<
  57. endif
  58. te-vms.obj: [.config]te-vms.c
  59. $(COMPILE.c) /obj=$@ $< + sys$$library:sys$$lib_c.tlb/lib
  60. clean:
  61. $$ purge
  62. $(RM) *.obj;
  63. $(RM) *.exe;
  64. $(RM) atof-targ.c;
  65. $(RM) obj-format.c;
  66. $(RM) obj-format.h;
  67. $(RM) targ-env.h;
  68. $(RM) targ-cpu.h;
  69. $(RM) targ-cpu.c;