]> granicus.if.org Git - strace/blob - Makefile.am
b107235f39f18e46ce2fb0aaeea4d99cc6a45a00
[strace] / Makefile.am
1 # Automake input for strace.
2 #
3 # Copyright (c) 2002-2009 Roland McGrath <roland@redhat.com>
4 # Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
5 # Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org>
6 # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
7 # All rights reserved.
8 #
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
11 # are met:
12 # 1. Redistributions of source code must retain the above copyright
13 #    notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 #    notice, this list of conditions and the following disclaimer in the
16 #    documentation and/or other materials provided with the distribution.
17 # 3. The name of the author may not be used to endorse or promote products
18 #    derived from this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 if HAVE_M32_RUNTIME
32 TESTS_M32 = tests-m32
33 endif
34 if HAVE_MX32_RUNTIME
35 TESTS_MX32 = tests-mx32
36 endif
37 SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32)
38
39 bin_PROGRAMS = strace
40 man_MANS = strace.1
41 bin_SCRIPTS = strace-graph strace-log-merge
42
43 OS              = linux
44 # ARCH is `i386', `m68k', `sparc', etc.
45 ARCH            = @arch@
46
47 ACLOCAL_AMFLAGS = -I m4
48 AM_CFLAGS = $(WARN_CFLAGS)
49 AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
50               -I$(srcdir)/$(OS)/$(ARCH) \
51               -I$(builddir)/$(OS) \
52               -I$(srcdir)/$(OS) \
53               -I$(builddir) \
54               -I$(srcdir)
55
56 include xlat/Makemodule.am
57
58 strace_CPPFLAGS = $(AM_CPPFLAGS)
59 strace_LDFLAGS =
60 strace_LDADD =
61 noinst_LIBRARIES =
62
63 strace_SOURCES =        \
64         access.c        \
65         affinity.c      \
66         aio.c           \
67         alpha.c         \
68         bjm.c           \
69         block.c         \
70         bpf.c           \
71         cacheflush.c    \
72         capability.c    \
73         caps0.h         \
74         caps1.h         \
75         chdir.c         \
76         chmod.c         \
77         clone.c         \
78         count.c         \
79         defs.h          \
80         desc.c          \
81         dirent.c        \
82         dirent64.c      \
83         empty.h         \
84         epoll.c         \
85         evdev.c         \
86         eventfd.c       \
87         execve.c        \
88         exit.c          \
89         fadvise.c       \
90         fallocate.c     \
91         fanotify.c      \
92         fchownat.c      \
93         fcntl.c         \
94         fetch_seccomp_fprog.c \
95         fetch_struct_flock.c \
96         file.c          \
97         file_handle.c   \
98         flock.c         \
99         flock.h         \
100         futex.c         \
101         gcc_compat.h    \
102         get_robust_list.c \
103         getcpu.c        \
104         getcwd.c        \
105         getrandom.c     \
106         hostname.c      \
107         inotify.c       \
108         io.c            \
109         ioctl.c         \
110         ioperm.c        \
111         iopl.c          \
112         ioprio.c        \
113         ipc_defs.h      \
114         ipc_msg.c       \
115         ipc_msgctl.c    \
116         ipc_sem.c       \
117         ipc_shm.c       \
118         ipc_shmctl.c    \
119         kcmp.c          \
120         kernel_types.h  \
121         kexec.c         \
122         keyctl.c        \
123         ldt.c           \
124         link.c          \
125         linux/asm_stat.h \
126         linux/x32/asm_stat.h \
127         lookup_dcookie.c \
128         loop.c          \
129         lseek.c         \
130         mem.c           \
131         membarrier.c    \
132         memfd_create.c  \
133         mknod.c         \
134         mount.c         \
135         mpers_type.h    \
136         mq.c            \
137         mtd.c           \
138         native_defs.h   \
139         net.c           \
140         open.c          \
141         or1k_atomic.c   \
142         pathtrace.c     \
143         perf.c          \
144         personality.c   \
145         poll.c          \
146         prctl.c         \
147         print_mq_attr.c \
148         print_msgbuf.c  \
149         print_sigevent.c \
150         print_time.c    \
151         print_timex.c   \
152         printmode.c     \
153         printrusage.c   \
154         printsiginfo.c  \
155         printsiginfo.h  \
156         printstat.h     \
157         process.c       \
158         process_vm.c    \
159         ptp.c           \
160         ptrace.h        \
161         quota.c         \
162         readahead.c     \
163         readlink.c      \
164         reboot.c        \
165         regs.h          \
166         renameat.c      \
167         resource.c      \
168         rtc.c           \
169         sched.c         \
170         scsi.c          \
171         seccomp.c       \
172         seccomp_fprog.h \
173         sendfile.c      \
174         sigaltstack.c   \
175         signal.c        \
176         signalfd.c      \
177         sigreturn.c     \
178         sock.c          \
179         socketutils.c   \
180         sram_alloc.c    \
181         statfs.c        \
182         strace.c        \
183         swapon.c        \
184         sync_file_range.c \
185         syscall.c       \
186         sysctl.c        \
187         sysinfo.c       \
188         syslog.c        \
189         sysmips.c       \
190         term.c          \
191         time.c          \
192         times.c         \
193         truncate.c      \
194         uid.c           \
195         uid16.c         \
196         umask.c         \
197         umount.c        \
198         uname.c         \
199         userfaultfd.c   \
200         util.c          \
201         utime.c         \
202         utimes.c        \
203         v4l2.c          \
204         vsprintf.c      \
205         wait.c          \
206         xattr.c         \
207         xmalloc.c       \
208         # end of strace_SOURCES
209
210 if USE_LIBUNWIND
211 strace_SOURCES += unwind.c
212 strace_CPPFLAGS += $(libunwind_CPPFLAGS)
213 strace_LDFLAGS += $(libunwind_LDFLAGS)
214 strace_LDADD += $(libunwind_LIBS)
215 endif
216
217 # Enable this to get link map generated
218 #strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
219
220 EXTRA_DIST =                            \
221         $(man_MANS)                     \
222         .version                        \
223         COPYING                         \
224         CREDITS                         \
225         ChangeLog                       \
226         ChangeLog-CVS                   \
227         README-linux-ptrace             \
228         debian/changelog                \
229         debian/compat                   \
230         debian/control                  \
231         debian/copyright                \
232         debian/rules                    \
233         debian/source/format            \
234         debian/strace-udeb.install      \
235         debian/strace.docs              \
236         debian/strace.examples          \
237         debian/strace.install           \
238         debian/strace.manpages          \
239         debian/strace64.install         \
240         debian/strace64.manpages        \
241         debian/watch                    \
242         errnoent.sh                     \
243         generate_sen.sh                 \
244         ioctlsort.c                     \
245         linux/32/ioctls_inc.h           \
246         linux/32/ioctls_inc_align32.h   \
247         linux/32/ioctls_inc_align64.h   \
248         linux/32/syscallent.h           \
249         linux/64/ioctls_inc.h           \
250         linux/64/syscallent.h           \
251         linux/aarch64/arch_regs.c       \
252         linux/aarch64/arch_regs.h       \
253         linux/aarch64/arch_sigreturn.c  \
254         linux/aarch64/errnoent1.h       \
255         linux/aarch64/get_error.c       \
256         linux/aarch64/get_scno.c        \
257         linux/aarch64/get_syscall_args.c\
258         linux/aarch64/ioctls_arch0.h    \
259         linux/aarch64/ioctls_arch1.h    \
260         linux/aarch64/ioctls_inc0.h     \
261         linux/aarch64/ioctls_inc1.h     \
262         linux/aarch64/signalent1.h      \
263         linux/aarch64/syscallent.h      \
264         linux/aarch64/syscallent1.h     \
265         linux/alpha/arch_getrval2.c     \
266         linux/alpha/arch_regs.c         \
267         linux/alpha/arch_regs.h         \
268         linux/alpha/arch_sigreturn.c    \
269         linux/alpha/errnoent.h          \
270         linux/alpha/get_error.c         \
271         linux/alpha/get_scno.c          \
272         linux/alpha/get_syscall_args.c  \
273         linux/alpha/get_syscall_result.c\
274         linux/alpha/ioctls_arch0.h      \
275         linux/alpha/ioctls_inc0.h       \
276         linux/alpha/signalent.h         \
277         linux/alpha/syscallent.h        \
278         linux/alpha/userent.h           \
279         linux/arc/arch_regs.c           \
280         linux/arc/get_error.c           \
281         linux/arc/get_scno.c            \
282         linux/arc/get_syscall_args.c    \
283         linux/arc/ioctls_arch0.h        \
284         linux/arc/ioctls_inc0.h         \
285         linux/arc/syscallent.h          \
286         linux/arch_regs.h               \
287         linux/arch_sigreturn.c          \
288         linux/arm/arch_regs.c           \
289         linux/arm/arch_regs.h           \
290         linux/arm/arch_sigreturn.c      \
291         linux/arm/get_error.c           \
292         linux/arm/get_scno.c            \
293         linux/arm/get_syscall_args.c    \
294         linux/arm/ioctls_arch0.h        \
295         linux/arm/ioctls_inc0.h         \
296         linux/arm/syscallent.h          \
297         linux/arm/userent.h             \
298         linux/avr32/arch_regs.c         \
299         linux/avr32/get_error.c         \
300         linux/avr32/get_scno.c          \
301         linux/avr32/get_syscall_args.c  \
302         linux/avr32/ioctls_arch0.h      \
303         linux/avr32/ioctls_inc0.h       \
304         linux/avr32/syscallent.h        \
305         linux/avr32/userent.h           \
306         linux/bfin/arch_regs.c          \
307         linux/bfin/get_error.c          \
308         linux/bfin/get_scno.c           \
309         linux/bfin/get_syscall_args.c   \
310         linux/bfin/get_syscall_result.c \
311         linux/bfin/ioctls_arch0.h       \
312         linux/bfin/ioctls_inc0.h        \
313         linux/bfin/syscallent.h         \
314         linux/bfin/userent.h            \
315         linux/crisv10/arch_regs.c       \
316         linux/crisv10/arch_sigreturn.c  \
317         linux/crisv10/get_error.c       \
318         linux/crisv10/get_scno.c        \
319         linux/crisv10/get_syscall_args.c        \
320         linux/crisv10/get_syscall_result.c      \
321         linux/crisv10/userent.h         \
322         linux/crisv32/arch_regs.c       \
323         linux/crisv32/arch_sigreturn.c  \
324         linux/crisv32/get_error.c       \
325         linux/crisv32/get_scno.c        \
326         linux/crisv32/get_syscall_args.c        \
327         linux/crisv32/get_syscall_result.c      \
328         linux/crisv32/userent.h         \
329         linux/dummy.h                   \
330         linux/errnoent.h                \
331         linux/hppa/arch_regs.c          \
332         linux/hppa/arch_regs.h          \
333         linux/hppa/errnoent.h           \
334         linux/hppa/get_error.c          \
335         linux/hppa/get_scno.c           \
336         linux/hppa/get_syscall_args.c   \
337         linux/hppa/get_syscall_result.c \
338         linux/hppa/ioctls_arch0.h       \
339         linux/hppa/ioctls_inc0.h        \
340         linux/hppa/signalent.h          \
341         linux/hppa/syscallent.h         \
342         linux/i386/arch_regs.c          \
343         linux/i386/arch_regs.h          \
344         linux/i386/arch_sigreturn.c     \
345         linux/i386/get_error.c          \
346         linux/i386/get_scno.c           \
347         linux/i386/get_syscall_args.c   \
348         linux/i386/ioctls_arch0.h       \
349         linux/i386/ioctls_inc0.h        \
350         linux/i386/syscallent.h         \
351         linux/i386/userent.h            \
352         linux/i386/userent0.h           \
353         linux/ia64/arch_getrval2.c      \
354         linux/ia64/arch_regs.c          \
355         linux/ia64/arch_regs.h          \
356         linux/ia64/arch_sigreturn.c     \
357         linux/ia64/get_error.c          \
358         linux/ia64/get_scno.c           \
359         linux/ia64/get_syscall_args.c   \
360         linux/ia64/ioctls_arch0.h       \
361         linux/ia64/ioctls_inc0.h        \
362         linux/ia64/syscallent.h         \
363         linux/ia64/userent.h            \
364         linux/inet_diag.h               \
365         linux/m68k/arch_regs.c          \
366         linux/m68k/arch_sigreturn.c     \
367         linux/m68k/get_error.c          \
368         linux/m68k/get_scno.c           \
369         linux/m68k/get_syscall_args.c   \
370         linux/m68k/get_syscall_result.c \
371         linux/m68k/ioctls_arch0.h       \
372         linux/m68k/ioctls_inc0.h        \
373         linux/m68k/syscallent.h         \
374         linux/m68k/userent.h            \
375         linux/metag/arch_regs.c         \
376         linux/metag/get_error.c         \
377         linux/metag/get_scno.c          \
378         linux/metag/get_syscall_args.c  \
379         linux/metag/ioctls_arch0.h      \
380         linux/metag/ioctls_inc0.h       \
381         linux/metag/syscallent.h        \
382         linux/microblaze/arch_regs.c    \
383         linux/microblaze/arch_sigreturn.c       \
384         linux/microblaze/get_error.c    \
385         linux/microblaze/get_scno.c     \
386         linux/microblaze/get_syscall_args.c     \
387         linux/microblaze/get_syscall_result.c   \
388         linux/microblaze/ioctls_arch0.h \
389         linux/microblaze/ioctls_inc0.h  \
390         linux/microblaze/syscallent.h   \
391         linux/microblaze/userent.h      \
392         linux/mips/arch_getrval2.c      \
393         linux/mips/arch_regs.c          \
394         linux/mips/arch_regs.h          \
395         linux/mips/arch_sigreturn.c     \
396         linux/mips/errnoent.h           \
397         linux/mips/genstub.sh           \
398         linux/mips/get_error.c          \
399         linux/mips/get_scno.c           \
400         linux/mips/get_syscall_args.c   \
401         linux/mips/ioctls_arch0.h       \
402         linux/mips/ioctls_inc0.h        \
403         linux/mips/signalent.h          \
404         linux/mips/syscallent-compat.h  \
405         linux/mips/syscallent-n32.h     \
406         linux/mips/syscallent-n64.h     \
407         linux/mips/syscallent-o32.h     \
408         linux/mips/syscallent.h         \
409         linux/mips/userent.h            \
410         linux/mtd-abi.h                 \
411         linux/nios2/arch_regs.c         \
412         linux/nios2/get_error.c         \
413         linux/nios2/get_scno.c          \
414         linux/nios2/get_syscall_args.c  \
415         linux/nios2/ioctls_arch0.h      \
416         linux/nios2/ioctls_inc0.h       \
417         linux/nios2/syscallent.h        \
418         linux/or1k/arch_regs.c          \
419         linux/or1k/get_error.c          \
420         linux/or1k/get_scno.c           \
421         linux/or1k/get_syscall_args.c   \
422         linux/or1k/ioctls_arch0.h       \
423         linux/or1k/ioctls_inc0.h        \
424         linux/or1k/syscallent.h         \
425         linux/or1k/userent.h            \
426         linux/personality.h             \
427         linux/powerpc/arch_regs.c       \
428         linux/powerpc/arch_regs.h       \
429         linux/powerpc/arch_sigreturn.c  \
430         linux/powerpc/errnoent.h        \
431         linux/powerpc/get_error.c       \
432         linux/powerpc/get_scno.c        \
433         linux/powerpc/get_syscall_args.c        \
434         linux/powerpc/getregs_old.c     \
435         linux/powerpc/ioctls_arch0.h    \
436         linux/powerpc/ioctls_inc0.h     \
437         linux/powerpc/syscallent.h      \
438         linux/powerpc/userent.h         \
439         linux/powerpc64/arch_regs.c     \
440         linux/powerpc64/arch_regs.h     \
441         linux/powerpc64/arch_sigreturn.c        \
442         linux/powerpc64/errnoent.h      \
443         linux/powerpc64/errnoent1.h     \
444         linux/powerpc64/get_error.c     \
445         linux/powerpc64/get_scno.c      \
446         linux/powerpc64/get_syscall_args.c      \
447         linux/powerpc64/getregs_old.c   \
448         linux/powerpc64/ioctls_arch0.h  \
449         linux/powerpc64/ioctls_arch1.h  \
450         linux/powerpc64/ioctls_inc0.h   \
451         linux/powerpc64/ioctls_inc1.h   \
452         linux/powerpc64/signalent1.h    \
453         linux/powerpc64/syscallent.h    \
454         linux/powerpc64/syscallent1.h   \
455         linux/powerpc64/userent.h       \
456         linux/ptp_clock.h               \
457         linux/s390/arch_regs.c          \
458         linux/s390/arch_regs.h          \
459         linux/s390/arch_sigreturn.c     \
460         linux/s390/get_error.c          \
461         linux/s390/get_scno.c           \
462         linux/s390/get_syscall_args.c   \
463         linux/s390/ioctls_arch0.h       \
464         linux/s390/ioctls_inc0.h        \
465         linux/s390/syscallent.h         \
466         linux/s390/userent.h            \
467         linux/s390/userent0.h           \
468         linux/s390/userent1.h           \
469         linux/s390x/arch_regs.c         \
470         linux/s390x/arch_regs.h         \
471         linux/s390x/arch_sigreturn.c    \
472         linux/s390x/get_error.c         \
473         linux/s390x/get_scno.c          \
474         linux/s390x/get_syscall_args.c  \
475         linux/s390x/ioctls_arch0.h      \
476         linux/s390x/ioctls_inc0.h       \
477         linux/s390x/syscallent.h        \
478         linux/s390x/userent.h           \
479         linux/sh/arch_getrval2.c        \
480         linux/sh/arch_regs.c            \
481         linux/sh/get_error.c            \
482         linux/sh/get_scno.c             \
483         linux/sh/get_syscall_args.c     \
484         linux/sh/get_syscall_result.c   \
485         linux/sh/ioctls_arch0.h         \
486         linux/sh/ioctls_inc0.h          \
487         linux/sh/syscallent.h           \
488         linux/sh/userent.h              \
489         linux/sh/userent0.h             \
490         linux/sh64/arch_regs.c          \
491         linux/sh64/arch_regs.h          \
492         linux/sh64/get_error.c          \
493         linux/sh64/get_scno.c           \
494         linux/sh64/get_syscall_args.c   \
495         linux/sh64/get_syscall_result.c \
496         linux/sh64/ioctls_arch0.h       \
497         linux/sh64/ioctls_inc0.h        \
498         linux/sh64/syscallent.h         \
499         linux/sh64/userent.h            \
500         linux/signalent.h               \
501         linux/sock_diag.h               \
502         linux/sparc/arch_getrval2.c     \
503         linux/sparc/arch_regs.c         \
504         linux/sparc/arch_regs.h         \
505         linux/sparc/arch_sigreturn.c    \
506         linux/sparc/errnoent.h          \
507         linux/sparc/gen.pl              \
508         linux/sparc/get_error.c         \
509         linux/sparc/get_scno.c          \
510         linux/sparc/get_syscall_args.c  \
511         linux/sparc/ioctls_arch0.h      \
512         linux/sparc/ioctls_inc0.h       \
513         linux/sparc/signalent.h         \
514         linux/sparc/syscallent.h        \
515         linux/sparc/userent.h           \
516         linux/sparc64/arch_getrval2.c   \
517         linux/sparc64/arch_regs.c       \
518         linux/sparc64/arch_regs.h       \
519         linux/sparc64/arch_sigreturn.c  \
520         linux/sparc64/errnoent.h        \
521         linux/sparc64/errnoent1.h       \
522         linux/sparc64/get_error.c       \
523         linux/sparc64/get_scno.c        \
524         linux/sparc64/get_syscall_args.c\
525         linux/sparc64/ioctls_arch0.h    \
526         linux/sparc64/ioctls_arch1.h    \
527         linux/sparc64/ioctls_inc0.h     \
528         linux/sparc64/ioctls_inc1.h     \
529         linux/sparc64/signalent.h       \
530         linux/sparc64/signalent1.h      \
531         linux/sparc64/syscallent.h      \
532         linux/sparc64/syscallent1.h     \
533         linux/sparc64/userent.h         \
534         linux/subcall.h                 \
535         linux/syscall.h                 \
536         linux/tile/arch_regs.c          \
537         linux/tile/arch_regs.h          \
538         linux/tile/arch_sigreturn.c     \
539         linux/tile/errnoent1.h          \
540         linux/tile/get_error.c          \
541         linux/tile/get_scno.c           \
542         linux/tile/get_syscall_args.c   \
543         linux/tile/ioctls_arch0.h       \
544         linux/tile/ioctls_arch1.h       \
545         linux/tile/ioctls_inc0.h        \
546         linux/tile/ioctls_inc1.h        \
547         linux/tile/signalent1.h         \
548         linux/tile/syscallent.h         \
549         linux/tile/syscallent1.h        \
550         linux/tile/userent.h            \
551         linux/ubi-user.h                \
552         linux/unix_diag.h               \
553         linux/userent.h                 \
554         linux/userent0.h                \
555         linux/x32/arch_regs.c           \
556         linux/x32/arch_regs.h           \
557         linux/x32/arch_sigreturn.c      \
558         linux/x32/errnoent1.h           \
559         linux/x32/get_error.c           \
560         linux/x32/get_scno.c            \
561         linux/x32/get_syscall_args.c    \
562         linux/x32/ioctls_arch0.h        \
563         linux/x32/ioctls_arch1.h        \
564         linux/x32/ioctls_inc0.h         \
565         linux/x32/ioctls_inc1.h         \
566         linux/x32/signalent1.h          \
567         linux/x32/syscallent.h          \
568         linux/x32/syscallent1.h         \
569         linux/x32/userent.h             \
570         linux/x86_64/arch_regs.c        \
571         linux/x86_64/arch_regs.h        \
572         linux/x86_64/arch_sigreturn.c   \
573         linux/x86_64/errnoent1.h        \
574         linux/x86_64/errnoent2.h        \
575         linux/x86_64/gentab.pl          \
576         linux/x86_64/get_error.c        \
577         linux/x86_64/get_scno.c         \
578         linux/x86_64/get_syscall_args.c \
579         linux/x86_64/getregs_old.c      \
580         linux/x86_64/ioctls_arch0.h     \
581         linux/x86_64/ioctls_arch1.h     \
582         linux/x86_64/ioctls_arch2.h     \
583         linux/x86_64/ioctls_inc0.h      \
584         linux/x86_64/ioctls_inc1.h      \
585         linux/x86_64/ioctls_inc2.h      \
586         linux/x86_64/signalent1.h       \
587         linux/x86_64/signalent2.h       \
588         linux/x86_64/syscallent.h       \
589         linux/x86_64/syscallent1.h      \
590         linux/x86_64/syscallent2.h      \
591         linux/x86_64/userent.h          \
592         linux/xtensa/arch_regs.c        \
593         linux/xtensa/get_error.c        \
594         linux/xtensa/get_scno.c         \
595         linux/xtensa/get_syscall_args.c \
596         linux/xtensa/get_syscall_result.c       \
597         linux/xtensa/ioctls_arch0.h     \
598         linux/xtensa/ioctls_inc0.h      \
599         linux/xtensa/syscallent.h       \
600         linux/xtensa/userent.h          \
601         maint/ioctls_gen.sh             \
602         maint/ioctls_hex.sh             \
603         maint/ioctls_sym.sh             \
604         maint/print_ioctlent.c          \
605         mpers.awk                       \
606         mpers.sh                        \
607         mpers_test.sh                   \
608         mpers_xlat.h                    \
609         signalent.sh                    \
610         strace-graph                    \
611         strace-log-merge                \
612         strace.spec                     \
613         syscallent.sh                   \
614         $(XLAT_INPUT_FILES)             \
615         $(XLAT_HEADER_FILES)            \
616         xlat/gen.sh                     \
617         xlate.el
618
619 .PHONY: srpm
620 srpm: dist-xz
621         rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
622
623 $(srcdir)/.version:
624         $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
625
626 strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
627
628 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
629         for f in $^; do \
630                 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
631         done | sort -u > $@
632
633 syscallent_names = subcall.h syscallent.h syscallent1.h \
634                    syscallent-n32.h syscallent-n64.h syscallent-o32.h
635 syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
636 syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
637
638 sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
639         for f in $^; do cat -- $$f; done | \
640                 $(srcdir)/generate_sen.sh > $@
641
642 dist-hook:
643         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
644
645 today = $(shell date +%Y-%m-%d)
646 version_regexp = $(subst .,\.,$(VERSION))
647 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
648
649 news-check: NEWS
650         $(AM_V_GEN)if head -1 $< |                              \
651           grep -x $(news_check_regexp) >/dev/null; then         \
652                 :;                                              \
653         else                                                    \
654                 echo >&2 '$<: check failed';                    \
655                 exit 1;                                         \
656         fi
657
658 ioctlsort_CC = $(CC_FOR_BUILD)
659 ioctlsort_DEFS = $(DEFS)
660 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
661 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
662 ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
663 ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
664
665 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
666 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
667
668 ioctlent%.h: ioctlsort%
669         ./$< > $@
670
671 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
672         $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
673
674 ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
675         $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
676
677 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
678         cat $^ > $@
679
680 BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
681 CLEANFILES    = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
682 DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
683
684 # defines mpers_source_files
685 include mpers.am
686 srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
687
688 mpers_NAME =
689 mpers_PREFIX = $(mpers_NAME)_
690 mpers_DEFS = $(DEFS)
691 mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
692 mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
693 mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
694 libmpers_CPPFLAGS = $(AM_CPPFLAGS) -DIN_MPERS
695
696 # mpers targets
697
698 mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
699         for f in $^; do \
700                 CC="$(CC)" CFLAGS="$(mpers_sh_opts)" \
701                 CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
702                 $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
703         done
704         > $@
705
706 m%_type_defs.h: $(srcdir_mpers_source_files)
707         for f in $^; do \
708                 sed -n 's/^#include DEF_MPERS_TYPE(\([^)]\+\))/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
709         done > $@-t
710         echo '#undef MPERS_PRINTER_NAME' >> $@-t
711         echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
712         echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
713         mv $@-t $@
714
715 m%_funcs.h: $(srcdir_mpers_source_files)
716         for f in $^; do \
717                 sed -n 's/^SYS_FUNC(\([^)]\+\))/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
718         done > $@-t && \
719         echo '#include "sys_func.h"' >> $@-t
720         mv $@-t $@
721
722 # printers
723
724 printers.h: $(srcdir_mpers_source_files)
725         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
726         echo 'typedef struct {' >> $@-t
727         for f in $^; do \
728                 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/ \1 (*\2) \3;\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f || exit; \
729         done >> $@-t
730         echo '} struct_printers;' >> $@-t
731         echo 'extern const struct_printers *printers;' >> $@-t
732         echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
733         mv $@-t $@
734
735 %_printer_decls.h: $(srcdir_mpers_source_files)
736         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
737         for f in $^; do \
738                 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/extern \1 $(mpers_PREFIX)\2\3;/p' $$f || exit; \
739         done >> $@-t
740         mv $@-t $@
741
742 %_printer_defs.h: $(srcdir_mpers_source_files)
743         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
744         for f in $^; do \
745                 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/\.\2 = $(mpers_PREFIX)\2,/p' $$f || exit; \
746         done >> $@-t
747         mv $@-t $@
748
749 native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
750
751 if HAVE_M32_MPERS
752
753 strace_LDADD += libmpers-m32.a
754 noinst_LIBRARIES += libmpers-m32.a
755 libmpers_m32_a_SOURCES = $(mpers_source_files)
756 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
757 mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
758
759 BUILT_SOURCES += $(mpers_m32_targets)
760 CLEANFILES    += $(mpers_m32_targets)
761
762 $(mpers_m32_targets): mpers_NAME = m32
763
764 endif # HAVE_M32_MPERS
765
766 if HAVE_MX32_MPERS
767
768 strace_LDADD += libmpers-mx32.a
769 noinst_LIBRARIES += libmpers-mx32.a
770 libmpers_mx32_a_SOURCES = $(mpers_source_files)
771 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
772 mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
773
774 BUILT_SOURCES += $(mpers_mx32_targets)
775 CLEANFILES    += $(mpers_mx32_targets)
776
777 $(mpers_mx32_targets): mpers_NAME = mx32
778
779 endif # HAVE_MX32_MPERS
780
781 clean-local:
782         -rm -rf mpers-m32 mpers-mx32
783
784 if MAINTAINER_MODE
785
786 gen_changelog_start_date = 2009-07-08 20:00
787 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
788                      $(srcdir)/.version
789         @rm -f $@.new
790         (cd $(srcdir); \
791          ./gitlog-to-changelog --append-dot \
792            --since='$(gen_changelog_start_date)'; \
793          echo; echo; echo 'See ChangeLog-CVS for older changes.' \
794         ) > $@.new
795         chmod 444 $@.new
796         mv -f $@.new $@
797
798 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
799                    $(srcdir)/Makefile.in $(srcdir)/.version
800         $(AM_V_GEN)                                                     \
801         (                                                               \
802           cd $(srcdir);                                                 \
803           sed '/^##/,$$d' CREDITS.in;                                   \
804           { sed -n '1,/^##>/d; s/  \+/\t/; s/^./&/p' CREDITS.in;        \
805             git log --pretty=format:'%aN        %aE';                   \
806           } | LC_ALL=C sort -u                                          \
807             | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';             \
808         ) > $@-t && mv $@-t $@
809
810 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
811
812 endif