#
# makefile for gas
#
-# Created by Klaus K"ampf, kkaempf@progis.de
+# Created by Klaus Kaempf, kkaempf@progis.de
#
+#CC=gcc
+CC=cc
ifeq ($(CC),gcc)
DEFS=
LFLAGS=
LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj
else
-DEFS=/define=("table_size_of_flonum_powers_of_ten"="tabsiz_flonum_powers_of_ten",\
-"_bfd_generic_get_section_contents_in_window"="_bfd_generic_get_win_section_cont",\
-"_elf_section_from_bfd_section"="_bfd_elf_sec_from_bfd_sec","const=")
-CFLAGS=/noopt/debug/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)\
-/warnings=disable=(missingreturn,implicitfunc,ptrmismatch,undefescap,longextern,duptypespec)
-LFLAGS=
-LIBS=,sys$$library:vaxcrtl.olb/lib
+#DEFS=/define=("VMS_DEBUG","DEBUG2","DEBUG3","DEBUG5","DEBUG_SYMS","DEBUG_ALPHA")
+OPT=/noopt/debug
+CFLAGS=/names=(as_is,shortened)\
+ /include=([],[-.bfd],[.config],"../include","../")$(DEFS)$(OPT)\
+ /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
+#LFLAGS=/debug/map=as.map
endif
-OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\
- bignum-copy.obj,cond.obj,depend.obj,expr.obj,flonum-konst.obj,flonum-copy.obj,\
- flonum-mult.obj,frags.obj,hash.obj,input-file.obj,input-scrub.obj,\
- literal.obj,messages.obj,output-file.obj,read.obj,subsegs.obj,symbols.obj,\
- write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,macro.obj
+OBJS:=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,\
+ atof-generic.obj,cond.obj,depend.obj,expr.obj,flonum-konst.obj,\
+ flonum-copy.obj,flonum-mult.obj,frags.obj,hash.obj,input-file.obj,\
+ input-scrub.obj,literal.obj,messages.obj,output-file.obj,read.obj,\
+ subsegs.obj,symbols.obj,write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,\
+ macro.obj,ehopt.obj,dw2gencfi.obj,dwarf2dbg.obj,remap.obj
-GASPOBJS = gasp.obj,macro.obj,sb.obj,hash.obj
+ifeq ($(ARCH),IA64)
+OBJS:=$(OBJS),te-vms.obj
+endif
LIBIBERTY = [-.libiberty]libiberty.olb
LIBBFD = [-.bfd]libbfd.olb
LIBOPCODES = [-.opcodes]libopcodes.olb
-all: config.status [-.bfd]bfd.h as.exe gasp.exe
+all: as.exe
as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY)
link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
-gasp.exe: $(GASPOBJS) $(LIBBFD) $(LIBIBERTY)
- link$(LFLAGS)/exe=$@ $(GASPOBJS),$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
-
-config.status:
- $$ @config-gas
-
-targ-cpu.c: [.config]tc-alpha.c
- copy $< $@
-targ-cpu.h: [.config]tc-alpha.h
- copy $< $@
-targ-env.h: [.config]te-generic.h
- copy $< $@
-obj-format.h: [.config]obj-evax.h
- copy $< $@
-obj-format.c: [.config]obj-evax.c
- copy $< $@
-atof-targ.c: [.config]atof-ieee.c
- copy $< $@
-
-targ-cpu.obj: targ-cpu.c targ-cpu.h [.config]atof-vax.c
+ifneq ($(CC),gcc)
+# Work-around a DEC-C bug.
+targ-cpu.obj: targ-cpu.c targ-cpu.h
+ $(COMPILE.c) /noopt/obj=$@ $<
+endif
-[-.bfd]bfd.h:
- $(CD) [-.bfd]
- gmake -f makefile.vms
- $(CD) [-.gas]
+te-vms.obj: [.config]te-vms.c
+ $(COMPILE.c) /obj=$@ $< + sys$$library:sys$$lib_c.tlb/lib
clean:
$$ purge
$(RM) targ-env.h;
$(RM) targ-cpu.h;
$(RM) targ-cpu.c;
- $(RM) config.status;