Commit | Line | Data |
---|---|---|
cb0e7c25 TG |
1 | # |
2 | # makefile for gas | |
3 | # | |
4 | # Created by Klaus Kaempf, kkaempf@progis.de | |
5 | # | |
82704155 | 6 | # Copyright (C) 2012-2019 Free Software Foundation, Inc. |
5bf135a7 NC |
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. | |
3739860c | 12 | # |
5bf135a7 NC |
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. | |
3739860c | 17 | # |
5bf135a7 NC |
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 | ||
cb0e7c25 TG |
23 | #CC=gcc |
24 | CC=cc | |
cb0e7c25 TG |
25 | |
26 | ifeq ($(CC),gcc) | |
27 | DEFS= | |
28 | CFLAGS=/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS) | |
29 | LFLAGS= | |
30 | LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj | |
31 | else | |
32 | #DEFS=/define=("VMS_DEBUG","DEBUG2","DEBUG3","DEBUG5","DEBUG_SYMS","DEBUG_ALPHA") | |
33 | OPT=/noopt/debug | |
34 | CFLAGS=/names=(as_is,shortened)\ | |
fb792462 | 35 | /include=([],[-.bfd],[.config],"../include","../")$(DEFS)$(OPT)\ |
cb0e7c25 TG |
36 | /prefix=(all,except=("getopt","optarg","optopt","optind","opterr")) |
37 | #LFLAGS=/debug/map=as.map | |
cb0e7c25 TG |
38 | endif |
39 | ||
aba69ce4 | 40 | OBJS:=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,\ |
1222b291 TG |
41 | atof-generic.obj,cond.obj,compress-debug.obj,depend.obj,expr.obj,\ |
42 | flonum-konst.obj,flonum-copy.obj,flonum-mult.obj,\ | |
43 | frags.obj,hash.obj,input-file.obj,\ | |
cb0e7c25 TG |
44 | input-scrub.obj,literal.obj,messages.obj,output-file.obj,read.obj,\ |
45 | subsegs.obj,symbols.obj,write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,\ | |
46 | macro.obj,ehopt.obj,dw2gencfi.obj,dwarf2dbg.obj,remap.obj | |
47 | ||
aba69ce4 TG |
48 | ifeq ($(ARCH),IA64) |
49 | OBJS:=$(OBJS),te-vms.obj | |
50 | endif | |
51 | ||
cb0e7c25 | 52 | LIBIBERTY = [-.libiberty]libiberty.olb |
cb0e7c25 TG |
53 | LIBBFD = [-.bfd]libbfd.olb |
54 | LIBOPCODES = [-.opcodes]libopcodes.olb | |
cb0e7c25 TG |
55 | |
56 | all: as.exe | |
57 | ||
58 | as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY) | |
59 | link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS) | |
60 | ||
61 | ifneq ($(CC),gcc) | |
62 | # Work-around a DEC-C bug. | |
63 | targ-cpu.obj: targ-cpu.c targ-cpu.h | |
64 | $(COMPILE.c) /noopt/obj=$@ $< | |
65 | endif | |
66 | ||
b11d79f2 TG |
67 | te-vms.obj: [.config]te-vms.c |
68 | $(COMPILE.c) /obj=$@ $< + sys$$library:sys$$lib_c.tlb/lib | |
69 | ||
cb0e7c25 TG |
70 | clean: |
71 | $$ purge | |
72 | $(RM) *.obj; | |
73 | $(RM) *.exe; | |
74 | $(RM) atof-targ.c; | |
75 | $(RM) obj-format.c; | |
76 | $(RM) obj-format.h; | |
77 | $(RM) targ-env.h; | |
78 | $(RM) targ-cpu.h; | |
79 | $(RM) targ-cpu.c; |