2009-05-25 15:11:33 +02:00
|
|
|
#
|
|
|
|
# makefile for gas
|
|
|
|
#
|
|
|
|
# Created by Klaus Kaempf, kkaempf@progis.de
|
|
|
|
#
|
2018-01-03 06:17:27 +01:00
|
|
|
# Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
2012-12-17 17:56:12 +01:00
|
|
|
#
|
|
|
|
# This file is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
2015-08-12 13:40:42 +02:00
|
|
|
#
|
2012-12-17 17:56:12 +01:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2015-08-12 13:40:42 +02:00
|
|
|
#
|
2012-12-17 17:56:12 +01:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; see the file COPYING3. If not see
|
|
|
|
# <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2009-05-25 15:11:33 +02:00
|
|
|
#CC=gcc
|
|
|
|
CC=cc
|
|
|
|
|
|
|
|
ifeq ($(CC),gcc)
|
|
|
|
DEFS=
|
|
|
|
CFLAGS=/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)
|
|
|
|
LFLAGS=
|
|
|
|
LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj
|
|
|
|
else
|
|
|
|
#DEFS=/define=("VMS_DEBUG","DEBUG2","DEBUG3","DEBUG5","DEBUG_SYMS","DEBUG_ALPHA")
|
|
|
|
OPT=/noopt/debug
|
|
|
|
CFLAGS=/names=(as_is,shortened)\
|
2009-09-01 15:38:26 +02:00
|
|
|
/include=([],[-.bfd],[.config],"../include","../")$(DEFS)$(OPT)\
|
2009-05-25 15:11:33 +02:00
|
|
|
/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
|
|
|
|
#LFLAGS=/debug/map=as.map
|
|
|
|
endif
|
|
|
|
|
2009-09-15 12:58:28 +02:00
|
|
|
OBJS:=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,\
|
2010-08-03 16:29:00 +02:00
|
|
|
atof-generic.obj,cond.obj,compress-debug.obj,depend.obj,expr.obj,\
|
|
|
|
flonum-konst.obj,flonum-copy.obj,flonum-mult.obj,\
|
|
|
|
frags.obj,hash.obj,input-file.obj,\
|
2009-05-25 15:11:33 +02:00
|
|
|
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
|
|
|
|
|
2009-09-15 12:58:28 +02:00
|
|
|
ifeq ($(ARCH),IA64)
|
|
|
|
OBJS:=$(OBJS),te-vms.obj
|
|
|
|
endif
|
|
|
|
|
2009-05-25 15:11:33 +02:00
|
|
|
LIBIBERTY = [-.libiberty]libiberty.olb
|
|
|
|
LIBBFD = [-.bfd]libbfd.olb
|
|
|
|
LIBOPCODES = [-.opcodes]libopcodes.olb
|
|
|
|
|
|
|
|
all: as.exe
|
|
|
|
|
|
|
|
as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY)
|
|
|
|
link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
|
|
|
|
|
|
|
|
ifneq ($(CC),gcc)
|
|
|
|
# Work-around a DEC-C bug.
|
|
|
|
targ-cpu.obj: targ-cpu.c targ-cpu.h
|
|
|
|
$(COMPILE.c) /noopt/obj=$@ $<
|
|
|
|
endif
|
|
|
|
|
2009-09-07 11:15:31 +02:00
|
|
|
te-vms.obj: [.config]te-vms.c
|
|
|
|
$(COMPILE.c) /obj=$@ $< + sys$$library:sys$$lib_c.tlb/lib
|
|
|
|
|
2009-05-25 15:11:33 +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;
|