blob: 15f87fc64dd6070f4566a5b2499b778d018e77ba [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001# Makefile.in -- strace Makefile prototype -*- Makefile -*-
2#
3# $Id$
4#
5
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +00006srcdir = @srcdir@
7VPATH = @srcdir@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00008
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +00009CC = @CC@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000010
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000011INSTALL = @INSTALL@
12INSTALL_PROGRAM = @INSTALL_PROGRAM@
13INSTALL_DATA = @INSTALL_DATA@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000014
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000015DEFS = @DEFS@
16LDLIBS = @LIBS@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000017
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000018CFLAGS = @CFLAGS@
19CPPFLAGS = @CPPFLAGS@
20LDFLAGS = @LDFLAGS@
21WARNFLAGS = @WARNFLAGS@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000022
Wichert Akkermanbf79f2e2000-09-01 21:03:06 +000023# OS is one of `linux', `sunos4', `svr4', or `freebsd'.
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000024OS = @opsys@
Wichert Akkermanc7926982000-04-10 22:22:31 +000025# ARCH is one of `i386', `m68k', `sparc', `arm', `mips' or `ia64'.
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000026ARCH = @arch@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000027# OSARCH is OS/ARCH if it exists, otherwise just OS.
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000028OSARCH = @osarch@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000029
30# You may define any of MAX_PROCS, DEFAULT_STRLEN, DEFAULT_ACOLUMN,
31# or DEFAULT_SORTBY here.
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000032EXTRA_DEFS =
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000033
34# Where include files are located, useful for cross-compiling.
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000035includedir = @includedir@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000036
37# Where to install the program:
38# I recommend `/usr' for Linux, `/usr/local' for the others.
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000039prefix = @prefix@
40exec_prefix = @exec_prefix@
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000041
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000042bindir = @bindir@
43mandir = @mandir@
44man1dir = $(mandir)/man1
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000045man1ext = .1
46
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000047SHELL = /bin/sh
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000048
Wichert Akkermanedf2dcc2001-02-16 20:14:40 +000049INCLUDES = -I. -I$(OS)/$(ARCH) -I$(srcdir)/$(OS)/$(ARCH) -I$(OS) \
50 -I$(srcdir)/$(OS)
51SUBDIRS = $(OSARCH)
52
53ALL_SUBDIRS = test linux linux/alpha linux/powerpc sunos4 svr4 freebsd/i386
54OBJ = strace.o version.o syscall.o util.o desc.o file.o ipc.o \
55 io.o ioctl.o mem.o net.o process.o bjm.o \
56 resource.o signal.o sock.o system.o term.o time.o \
57 proc.o stream.o
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000058
59all: strace
60
61strace: $(OBJ)
62 $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
63
64install: all
65 $(INSTALL_PROGRAM) strace $(bindir)/strace
Wichert Akkermanaec62381999-11-28 01:56:12 +000066 $(INSTALL_PROGRAM) $(srcdir)/strace-graph $(bindir)/strace-graph
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000067 $(INSTALL_DATA) $(srcdir)/strace.1 $(man1dir)/strace$(man1ext)
68
69clean: clean-local
70 for i in $(ALL_SUBDIRS); do \
71 (test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
72 done; exit 0
73
74clean-local:
75 rm -f *.o a.out core strace make.out
76
77distclean: distclean-local
78 for i in $(ALL_SUBDIRS); do \
79 (test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
80 done; exit 0
81
82distclean-local: clean-local
83 rm -f machine
84 rm -f Makefile config.h config.status config.cache config.log
85
86maintainer-clean: maintainter-clean-local
87 for i in $(ALL_SUBDIRS); do \
88 (test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
89 done; exit 0
90
91maintainer-clean-local: distclean-local
92
93.c.o:
94 $(CC) $(WARNFLAGS) $(DEFS) $(EXTRA_DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $<
95
96desc.o: desc.c defs.h config.h
97file.o: file.c defs.h config.h
98io.o: io.c defs.h config.h
99ioctl.o: ioctl.c defs.h config.h
100mem.o: mem.c defs.h config.h
101net.o: net.c defs.h config.h
102process.o: process.c defs.h config.h
103resource.o: resource.c defs.h config.h
104signal.o: signal.c defs.h config.h
105socket.o: socket.c defs.h config.h
106strace.o: strace.c defs.h config.h
107syscall.o: syscall.c defs.h config.h
108system.o: system.c defs.h config.h
109time.o: time.c defs.h config.h
110util.o: util.c defs.h config.h