Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | # |
2 | # Makefile for bfd library under openVMS (Alpha and Vax) | |
3 | # | |
4 | # For use with gnu-make for vms | |
5 | # | |
6 | # Created by Klaus K"ampf, kkaempf@rmi.de | |
7 | # | |
8 | # | |
9 | ||
10 | CC=cc | |
11 | ||
12 | ifeq ($(ARCH),ALPHA) | |
13 | HOSTFILE=alphavms.h | |
14 | TARGETOBJS = cpu-alpha.obj | |
15 | else | |
16 | HOSTFILE=vaxvms.h | |
17 | TARGETOBJS = cpu-vax.obj | |
18 | endif | |
19 | ||
20 | ||
d387240a TG |
21 | OBJS=archive.obj,archive64.obj,archures.obj,bfd.obj,bfdio.obj,binary.obj,\ |
22 | cache.obj,coffgen.obj,compress.obj,corefile.obj,dwarf2.obj,elf.obj,\ | |
23 | format.obj,hash.obj,ihex.obj,init.obj,libbfd.obj,linker.obj,opncls.obj,\ | |
24 | reloc.obj,section.obj,simple.obj,srec.obj,stab-syms.obj,syms.obj,\ | |
d5acff2f | 25 | targets.obj,tekhex.obj,verilog.obj,\ |
d387240a | 26 | vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,$(TARGETOBJS) |
252b5132 RH |
27 | |
28 | ifeq ($(CC),gcc) | |
29 | ifeq ($(ARCH),ALPHA) | |
30 | DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\ | |
31 | "HAVE_vms_alpha_vec=1") | |
32 | else | |
33 | DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\ | |
d387240a | 34 | "HAVE_vms_vax_vec=1") |
252b5132 RH |
35 | endif |
36 | CFLAGS=/include=([],[-.include])$(DEFS) | |
37 | else | |
38 | ifeq ($(ARCH),ALPHA) | |
0c376465 TG |
39 | DEFS=/define=(SELECT_VECS="&vms_alpha_vec",\ |
40 | SELECT_ARCHITECTURES="&bfd_alpha_arch",\ | |
41 | "HAVE_vms_alpha_vec=1","unlink=remove","DEBUGDIR=NULL") | |
252b5132 RH |
42 | else |
43 | DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\ | |
0c376465 | 44 | "HAVE_vms_vax_vec=1","unlink=remove") |
252b5132 | 45 | endif |
0c376465 TG |
46 | OPT=/noopt/debug |
47 | CFLAGS=/name=(as_is,shortened)/include=([],[-.include])$(DEFS)$(OPT) | |
252b5132 RH |
48 | endif |
49 | ||
50 | ||
51 | libbfd.olb: sysdep.h bfd.h $(OBJS) | |
52 | purge | |
53 | lib/create libbfd $(OBJS) | |
54 | ||
55 | sysdep.h: [.hosts]$(HOSTFILE) config.h | |
56 | $(CP) $< $@ | |
57 | ||
58 | bfd.h: bfd-in2.h | |
59 | $$ @configure | |
60 | ||
61 | targmatch.h: bfd.h | |
62 | config.h: bfd.h | |
63 | ||
64 | vms.c: vms.h | |
65 | vms-mhd.c: vms.h | |
66 | vms-gsd.c: vms.h | |
67 | vms-tir.c: vms.h | |
68 | vms-misc.c: vms.h | |
69 | targets.c: targmatch.h | |
70 | ||
71 | clean: | |
72 | $$ purge | |
73 | $(RM) libbfd.olb; | |
74 | $(RM) sysdep.h; | |
75 | $(RM) bfd.h; | |
76 | $(RM) targmatch.h; | |
77 | $(RM) config.h; | |
78 | $(RM) *.obj; |