1996-08-08 18:42:41 +02:00
|
|
|
#
|
|
|
|
# makefile for gas
|
|
|
|
#
|
1997-02-14 03:55:29 +01:00
|
|
|
# Created by Klaus K"ampf, kkaempf@progis.de
|
1996-08-08 18:42:41 +02:00
|
|
|
#
|
1998-07-02 20:55:33 +02:00
|
|
|
CC=gcc
|
|
|
|
ifeq ($(ARCH),ALPHA)
|
1996-08-08 18:42:41 +02:00
|
|
|
ifeq ($(CC),gcc)
|
|
|
|
DEFS=
|
1997-04-01 23:26:16 +02:00
|
|
|
CFLAGS=/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)
|
1996-08-08 18:42:41 +02:00
|
|
|
LFLAGS=
|
1997-10-20 21:43:05 +02:00
|
|
|
LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj
|
1996-08-08 18:42:41 +02:00
|
|
|
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=")
|
1998-05-06 21:32:31 +02:00
|
|
|
CFLAGS=/noopt/nodebug/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)\
|
1997-02-14 03:55:29 +01:00
|
|
|
/warnings=disable=(missingreturn,implicitfunc,ptrmismatch,undefescap,longextern,duptypespec)
|
1996-08-08 18:42:41 +02:00
|
|
|
LFLAGS=
|
1997-10-20 21:43:05 +02:00
|
|
|
LIBS=,sys$$library:vaxcrtl.olb/lib
|
1996-08-08 18:42:41 +02:00
|
|
|
endif
|
|
|
|
|
1998-07-02 20:55:33 +02:00
|
|
|
else # ARCH not ALPHA
|
|
|
|
|
|
|
|
ifeq ($(CC),gcc)
|
|
|
|
DEFS=
|
|
|
|
CFLAGS=/include=([],[.config],[-.include],[-])$(DEFS)
|
|
|
|
LFLAGS=
|
|
|
|
LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crtbegin.obj,GNU_CC_LIBRARY:crtend.obj
|
|
|
|
#LIBS=,gnu_cc:[000000]gcclib.olb/lib,sys$$library:vaxcrtl.olb/lib
|
|
|
|
else
|
|
|
|
error DECC is broken on VAX
|
|
|
|
DEFS=/define=("table_size_of_flonum_powers_of_ten"="tabsiz_flonum_powers_of_ten","const=")
|
|
|
|
CFLAGS=/noopt/debug/include=([],[.config],[-.include],[-])$(DEFS)\
|
|
|
|
/warnings=disable=(missingreturn,implicitfunc,ptrmismatch,undefescap,longextern,duptypespec)
|
|
|
|
LFLAGS=
|
|
|
|
LIBS=,sys$$library:vaxcrtl.olb/lib
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
1996-08-08 18:42:41 +02:00
|
|
|
OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\
|
1997-11-22 22:01:27 +01:00
|
|
|
bignum-copy.obj,cond.obj,depend.obj,expr.obj,flonum-konst.obj,flonum-copy.obj,\
|
1996-08-08 18:42:41 +02:00
|
|
|
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,\
|
1998-07-02 20:55:33 +02:00
|
|
|
write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,macro.obj,ehopt.obj
|
1996-08-08 18:42:41 +02:00
|
|
|
|
1997-04-05 20:20:59 +02:00
|
|
|
GASPOBJS = gasp.obj,macro.obj,sb.obj,hash.obj
|
|
|
|
|
1996-08-08 18:42:41 +02:00
|
|
|
LIBIBERTY = [-.libiberty]libiberty.olb
|
1998-07-02 20:55:33 +02:00
|
|
|
|
|
|
|
ifeq ($(ARCH),ALPHA)
|
1996-08-08 18:42:41 +02:00
|
|
|
LIBBFD = [-.bfd]libbfd.olb
|
|
|
|
LIBOPCODES = [-.opcodes]libopcodes.olb
|
1998-07-02 20:55:33 +02:00
|
|
|
BFDDEP = [-.bfd]bfd.h
|
|
|
|
else
|
|
|
|
LIBBFD =
|
|
|
|
LIBOPCODES =
|
|
|
|
BFDDEP =
|
|
|
|
endif
|
1996-08-08 18:42:41 +02:00
|
|
|
|
1998-07-02 20:55:33 +02:00
|
|
|
all: config.status $(BFDDEP) as.exe gasp.exe
|
1996-08-08 18:42:41 +02:00
|
|
|
|
|
|
|
as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY)
|
1998-07-02 20:55:33 +02:00
|
|
|
ifeq ($(ARCH),ALPHA)
|
1996-08-08 18:42:41 +02:00
|
|
|
link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
|
1998-07-02 20:55:33 +02:00
|
|
|
else
|
|
|
|
link$(LFLAGS)/exe=$@ $(OBJS),$(LIBIBERTY)/lib$(LIBS)
|
|
|
|
endif
|
1996-08-08 18:42:41 +02:00
|
|
|
|
1997-04-05 20:20:59 +02:00
|
|
|
gasp.exe: $(GASPOBJS) $(LIBBFD) $(LIBIBERTY)
|
1998-07-02 20:55:33 +02:00
|
|
|
ifeq ($(ARCH),ALPHA)
|
1997-04-05 20:20:59 +02:00
|
|
|
link$(LFLAGS)/exe=$@ $(GASPOBJS),$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
|
1998-07-02 20:55:33 +02:00
|
|
|
else
|
|
|
|
link$(LFLAGS)/exe=$@ $(GASPOBJS),$(LIBIBERTY)/lib$(LIBS)
|
|
|
|
endif
|
1996-08-08 18:42:41 +02:00
|
|
|
|
1997-04-01 23:26:16 +02:00
|
|
|
config.status:
|
|
|
|
$$ @config-gas
|
|
|
|
|
1998-07-02 20:55:33 +02:00
|
|
|
ifeq ($(ARCH),ALPHA)
|
|
|
|
CPU=alpha
|
|
|
|
OBJFORMAT=evax
|
|
|
|
FLTFORMAT=ieee
|
|
|
|
else
|
|
|
|
CPU=vax
|
|
|
|
OBJFORMAT=vms
|
|
|
|
FLTFORMAT=vax
|
|
|
|
endif
|
|
|
|
|
|
|
|
targ-cpu.c: [.config]tc-$(CPU).c
|
1996-08-08 18:42:41 +02:00
|
|
|
copy $< $@
|
1998-07-02 20:55:33 +02:00
|
|
|
targ-cpu.h: [.config]tc-$(CPU).h
|
1996-08-08 18:42:41 +02:00
|
|
|
copy $< $@
|
|
|
|
targ-env.h: [.config]te-generic.h
|
|
|
|
copy $< $@
|
1998-07-02 20:55:33 +02:00
|
|
|
obj-format.h: [.config]obj-$(OBJFORMAT).h
|
1996-08-08 18:42:41 +02:00
|
|
|
copy $< $@
|
1998-07-02 20:55:33 +02:00
|
|
|
obj-format.c: [.config]obj-$(OBJFORMAT).c
|
1996-08-08 18:42:41 +02:00
|
|
|
copy $< $@
|
1998-07-02 20:55:33 +02:00
|
|
|
atof-targ.c: [.config]atof-$(FLTFORMAT).c
|
1996-08-08 18:42:41 +02:00
|
|
|
copy $< $@
|
|
|
|
|
|
|
|
targ-cpu.obj: targ-cpu.c targ-cpu.h [.config]atof-vax.c
|
1997-04-01 23:26:16 +02:00
|
|
|
|
|
|
|
[-.bfd]bfd.h:
|
|
|
|
$(CD) [-.bfd]
|
1998-05-06 21:32:31 +02:00
|
|
|
gmake -f makefile.vms "CC=$(CC)"
|
1997-04-01 23:26:16 +02:00
|
|
|
$(CD) [-.gas]
|
|
|
|
|
1998-07-02 20:55:33 +02:00
|
|
|
install: as.exe gasp.exe
|
|
|
|
$(CP) $^ GNU_ROOT\:[BIN]
|
|
|
|
|
1997-04-01 23:26:16 +02:00
|
|
|
clean:
|
|
|
|
$$ purge
|
|
|
|
$(RM) *.obj;
|
|
|
|
$(RM) *.exe;
|
|
|
|
$(RM) atof-targ.c;
|
|
|
|
$(RM) obj-format.c;
|
|
|
|
$(RM) obj-format.h;
|
|
|
|
$(RM) targ-env.h;
|
|
|
|
$(RM) targ-cpu.h;
|
|
|
|
$(RM) targ-cpu.c;
|
|
|
|
$(RM) config.status;
|