--version, package reporting and --help additions.
[darwin-xtools.git] / cctools / include / Makefile
blob89f45c91f713204121aa01d755c93d079ad74b3c
1 # Note that the macros are not used for the install target any more with the
2 # change to the install(1) program. Edit the install commands.
4 ifneq "" "$(wildcard /bin/mkdirs)"
5 MKDIRS = /bin/mkdirs
6 else
7 MKDIRS = /bin/mkdir -p
8 endif
10 FILES = mach-o/ldsyms.h mach-o/reloc.h \
11 mach-o/nlist.h mach-o/stab.h mach-o/loader.h mach-o/fat.h \
12 mach-o/dyld_debug.h mach-o/arch.h mach-o/gmon.h mach-o/ranlib.h \
13 mach-o/swap.h mach-o/getsect.h mach-o/i386/swap.h \
14 mach-o/ppc/swap.h mach-o/ppc/reloc.h mach-o/x86_64/reloc.h \
15 mach-o/dyld.h mach-o/dyld_gdb.h mach-o/arm/reloc.h mach-o/arm64/reloc.h
17 LOCFILES = mach-o/rld_state.h mach-o/rld.h mach-o/sarld.h mach-o/kld.h \
18 mach-o/redo_prebinding.h \
19 mach-o/i860/swap.h mach-o/i860/reloc.h \
20 mach-o/hppa/swap.h mach-o/hppa/reloc.h \
21 mach-o/m88k/swap.h mach-o/m88k/reloc.h \
22 mach-o/m68k/swap.h \
23 mach-o/sparc/swap.h mach-o/sparc/reloc.h \
24 cbt/libsyminfo.h mach-o/dyld_priv.h
26 # Note that OTHER_SRCS do NOT get installed
27 GAS_OTHER_SRCS = stuff/bytesex.h stuff/bool.h stuff/rnd.h stuff/errors.h \
28 stuff/openstep_mach.h opcode/arm.h
29 OTHER_SRCS = notes gnu/symseg.h \
30 stuff/allocate.h stuff/arch.h stuff/execute.h \
31 stuff/ofile.h stuff/lto.h stuff/llvm.h \
32 stuff/hash_string.h stuff/breakout.h stuff/best_arch.h \
33 stuff/hppa.h stuff/reloc.h stuff/vm_flush_cache.h \
34 stuff/print.h stuff/version_number.h stuff/crc32.h sys/gmon.h \
35 stuff/seg_addr_table.h stuff/dylib_table.h \
36 stuff/SymLoc.h stuff/dylib_roots.h stuff/guess_short_name.h \
37 stuff/macosx_deployment_target.h stuff/symbol_list.h \
38 stuff/symbol.h stuff/unix_standard_mode.h \
39 coff/base_relocs.h coff/bytesex.h coff/ms_dos_stub.h \
40 coff/filehdr.h coff/aouthdr.h coff/scnhdr.h coff/syment.h \
41 coff/debug_directory.h elf/dwarf2.h llvm-c/Disassembler.h \
42 xar/xar.h $(GAS_OTHER_SRCS)
44 ENCUMBERED_SRCS = gnu/a.out.h gnu/exec.h
46 # Note that MISSING_SRCS are those may not be on all build machines
47 GAS_MISSING_SRCS = mach/m68k/thread_status.h \
48 mach/i860/thread_status.h \
49 mach/m88k/thread_status.h \
50 architecture/m88k/fp_regs.h \
51 architecture/m88k/reg_help.h \
52 architecture/nrw/reg_help.h \
53 architecture/nrw/macro_help.h \
54 mach/hppa/thread_status.h \
55 mach/sparc/thread_status.h \
56 architecture/sparc/reg.h \
57 mach/arm/thread_status.h \
58 mach/arm/thread_state.h \
59 mach/arm/_structs.h \
60 mach/ppc/thread_status.h \
61 mach/ppc/_structs.h
63 MISSING_SRCS = mach/machine.h \
64 architecture/i386/fpu.h architecture/i386/frame.h \
65 i386/eflags.h mach/i386/_structs.h mach/i386/fp_reg.h \
66 mach/i386/thread_state.h mach/i386/thread_status.h \
67 standalone/libsa.h \
68 $(GAS_MISSING_SRCS)
70 nextstep_INCDIR = /NextDeveloper/Headers
71 nextstep_LOCINCDIR = /LocalDeveloper/Headers
73 teflon_INCDIR = /System/Library/Frameworks/System.framework/Versions/B/Headers
74 teflon_LOCINCDIR = /System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders
76 ifeq "macos" "$(RC_OS)"
77 macos_INCDIR := $(shell if [ "$(RC_RELEASE)" = "Beaker" ] || \
78 [ "$(RC_RELEASE)" = "Bunsen" ] || \
79 [ "$(RC_RELEASE)" = "Gonzo" ] || \
80 [ "$(RC_RELEASE)" = "Kodiak" ]; then \
81 echo /System/Library/Frameworks/System.framework/Versions/B/Headers; \
82 else echo /usr/include; \
83 fi; )
84 macos_LOCINCDIR := $(shell if [ "$(RC_RELEASE)" = "Beaker" ] || \
85 [ "$(RC_RELEASE)" = "Bunsen" ] || \
86 [ "$(RC_RELEASE)" = "Gonzo" ] || \
87 [ "$(RC_RELEASE)" = "Kodiak" ]; then \
88 echo /System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders; \
89 else echo /usr/local/include; \
90 fi; )
91 else
92 macos_INCDIR = /System/Library/Frameworks/System.framework/Versions/B/Headers
93 macos_LOCINCDIR = /System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders
94 endif
96 SRC_FILES = Makefile $(FILES) $(LOCFILES) $(OTHER_SRCS) $(MISSING_SRCS)
97 GAS_SRC_FILES = Makefile $(GAS_OTHER_SRCS) $(GAS_MISSING_SRCS)
98 ENCUMBERED_SRC_FILES = $(SRC_FILES) $(ENCUMBERED_SRCS)
100 installsrc:
101 $(MKDIRS) $(SRCROOT)
102 chmod 755 $(SRCROOT)
103 gnutar cf - $(ENCUMBERED_SRC_FILES) | (cd $(SRCROOT); gnutar xf -)
105 installGASsrc:
106 $(MKDIRS) $(SRCROOT)
107 chmod 755 $(SRCROOT)
108 gnutar cf - $(GAS_SRC_FILES) | (cd $(SRCROOT); gnutar xf -)
110 install: dirs $(RC_OS)_install
112 teflon_install macos_install: common_install
114 nextstep_install: common_install
115 cd mach-o; \
116 install -c -m 444 ${IFLAGS} gmon.h \
117 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o
119 common_install:
120 cd mach-o; \
121 install -c -m 444 ${IFLAGS} arch.h ldsyms.h reloc.h \
122 stab.h loader.h fat.h swap.h getsect.h nlist.h \
123 ranlib.h ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o
124 if [ $(OLD_DYLD_STUFF) ]; \
125 then \
126 cd mach-o; install -c -m 444 ${IFLAGS} dyld.h dyld_debug.h \
127 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o ; \
129 cd mach-o/i386; \
130 install -c -m 444 ${IFLAGS} swap.h \
131 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/i386
132 cd mach-o/ppc; \
133 install -c -m 444 ${IFLAGS} reloc.h swap.h \
134 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/ppc
135 cd mach-o/x86_64; \
136 install -c -m 444 ${IFLAGS} reloc.h \
137 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/x86_64
138 cd mach-o/arm; \
139 install -c -m 444 ${IFLAGS} reloc.h \
140 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/arm
141 cd mach-o/arm64; \
142 install -c -m 444 ${IFLAGS} reloc.h \
143 ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/arm64
144 cd mach-o/m68k; \
145 install -c -m 444 ${IFLAGS} swap.h \
146 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/m68k
147 cd mach-o/sparc; \
148 install -c -m 444 ${IFLAGS} reloc.h swap.h \
149 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/sparc
150 cd mach-o/hppa; \
151 install -c -m 444 ${IFLAGS} reloc.h swap.h \
152 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/hppa
153 cd mach-o/i860; \
154 install -c -m 444 ${IFLAGS} reloc.h swap.h \
155 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/i860
156 cd mach-o/m88k; \
157 install -c -m 444 ${IFLAGS} reloc.h swap.h \
158 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/m88k
159 cd mach-o; \
160 install -c -m 444 ${IFLAGS} rld.h rld_state.h \
161 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o
162 if [ $(OLD_DYLD_STUFF) ]; \
163 then \
164 cd mach-o; install -c -m 444 ${IFLAGS} dyld_gdb.h dyld_priv.h \
165 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o ; \
167 cd mach-o; \
168 install -c -m 444 ${IFLAGS} sarld.h kld.h redo_prebinding.h \
169 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o
170 cd stuff; \
171 install -c -m 444 ${IFLAGS} bool.h \
172 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/dyld
173 cd cbt; \
174 install -c -m 444 ${IFLAGS} libsyminfo.h \
175 ${DSTROOT}${$(RC_OS)_LOCINCDIR}/cbt
177 dirs:
178 $(MKDIRS) ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/i386
179 $(MKDIRS) ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/ppc
180 $(MKDIRS) ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/x86_64
181 $(MKDIRS) ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/arm
182 $(MKDIRS) ${DSTROOT}${$(RC_OS)_INCDIR}/mach-o/arm64
183 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/m68k
184 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/sparc
185 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/hppa
186 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/i860
187 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/mach-o/m88k
188 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/dyld
189 $(MKDIRS) ${DSTROOT}${$(RC_OS)_LOCINCDIR}/cbt
191 depend:
193 clean shlib_clean:
195 all: