* elfcode.h (elf_object_p): Add more sanity checks on elf header.
[binutils.git] / gas / makefile.vms
blob41373c6b666ec51a7884bf0ecbd532220914562f
2 # makefile for gas
4 # Created by Klaus K"ampf, kkaempf@progis.de
6 CC=gcc
7 ifeq ($(ARCH),ALPHA)
8 ifeq ($(CC),gcc)
9 DEFS=
10 CFLAGS=/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)
11 LFLAGS=
12 LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj
13 else
14 DEFS=/define=("table_size_of_flonum_powers_of_ten"="tabsiz_flonum_powers_of_ten",\
15 "_bfd_generic_get_section_contents_in_window"="_bfd_generic_get_win_section_cont",\
16 "_elf_section_from_bfd_section"="_bfd_elf_sec_from_bfd_sec","const=")
17 CFLAGS=/noopt/nodebug/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)\
18 /warnings=disable=(missingreturn,implicitfunc,ptrmismatch,undefescap,longextern,duptypespec)
19 LFLAGS=
20 LIBS=,sys$$library:vaxcrtl.olb/lib
21 endif
23 else    # ARCH not ALPHA
25 ifeq ($(CC),gcc)
26 DEFS=
27 CFLAGS=/include=([],[.config],[-.include],[-])$(DEFS)
28 LFLAGS=
29 LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crtbegin.obj,GNU_CC_LIBRARY:crtend.obj
30 #LIBS=,gnu_cc:[000000]gcclib.olb/lib,sys$$library:vaxcrtl.olb/lib
31 else
32 error DECC is broken on VAX
33 DEFS=/define=("table_size_of_flonum_powers_of_ten"="tabsiz_flonum_powers_of_ten","const=")
34 CFLAGS=/noopt/debug/include=([],[.config],[-.include],[-])$(DEFS)\
35 /warnings=disable=(missingreturn,implicitfunc,ptrmismatch,undefescap,longextern,duptypespec)
36 LFLAGS=
37 LIBS=,sys$$library:vaxcrtl.olb/lib
38 endif
39 endif
42 OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\
43   cond.obj,depend.obj,expr.obj,flonum-konst.obj,flonum-copy.obj,\
44   flonum-mult.obj,frags.obj,hash.obj,input-file.obj,input-scrub.obj,\
45   literal.obj,messages.obj,output-file.obj,read.obj,subsegs.obj,symbols.obj,\
46   write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,macro.obj,ehopt.obj
48 LIBIBERTY = [-.libiberty]libiberty.olb
50 ifeq ($(ARCH),ALPHA)
51 LIBBFD = [-.bfd]libbfd.olb
52 LIBOPCODES = [-.opcodes]libopcodes.olb
53 BFDDEP = [-.bfd]bfd.h
54 else
55 LIBBFD =
56 LIBOPCODES =
57 BFDDEP =
58 endif
60 all: config.status $(BFDDEP) as.exe
62 as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY)
63 ifeq ($(ARCH),ALPHA)
64         link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
65 else
66         link$(LFLAGS)/exe=$@ $(OBJS),$(LIBIBERTY)/lib$(LIBS)
67 endif
69 config.status:
70         $$ @config-gas
72 ifeq ($(ARCH),ALPHA)
73 CPU=alpha
74 OBJFORMAT=evax
75 FLTFORMAT=ieee
76 else
77 CPU=vax
78 OBJFORMAT=vms
79 FLTFORMAT=vax
80 endif
82 targ-cpu.c: [.config]tc-$(CPU).c
83         copy $< $@
84 targ-cpu.h: [.config]tc-$(CPU).h
85         copy $< $@
86 targ-env.h: [.config]te-generic.h
87         copy $< $@
88 obj-format.h: [.config]obj-$(OBJFORMAT).h
89         copy $< $@
90 obj-format.c: [.config]obj-$(OBJFORMAT).c
91         copy $< $@
92 atof-targ.c: [.config]atof-$(FLTFORMAT).c
93         copy $< $@
95 targ-cpu.obj: targ-cpu.c targ-cpu.h [.config]atof-vax.c
97 [-.bfd]bfd.h:
98         $(CD) [-.bfd]
99         gmake -f makefile.vms "CC=$(CC)"
100         $(CD) [-.gas]
102 install: as.exe
103         $(CP) $^ GNU_ROOT\:[BIN]
105 clean:
106         $$ purge
107         $(RM) *.obj;
108         $(RM) *.exe;
109         $(RM) atof-targ.c;
110         $(RM) obj-format.c;
111         $(RM) obj-format.h;
112         $(RM) targ-env.h;
113         $(RM) targ-cpu.h;
114         $(RM) targ-cpu.c;
115         $(RM) config.status;