Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 1 | # Makefile.in -- strace Makefile prototype -*- Makefile -*- |
| 2 | # |
| 3 | # $Id$ |
| 4 | # |
| 5 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 6 | srcdir = @srcdir@ |
| 7 | VPATH = @srcdir@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 8 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 9 | CC = @CC@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 10 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 11 | INSTALL = @INSTALL@ |
| 12 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 13 | INSTALL_DATA = @INSTALL_DATA@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 14 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 15 | DEFS = @DEFS@ |
| 16 | LDLIBS = @LIBS@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 17 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 18 | CFLAGS = @CFLAGS@ |
| 19 | CPPFLAGS = @CPPFLAGS@ |
| 20 | LDFLAGS = @LDFLAGS@ |
| 21 | WARNFLAGS = @WARNFLAGS@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 22 | |
Wichert Akkerman | bf79f2e | 2000-09-01 21:03:06 +0000 | [diff] [blame] | 23 | # OS is one of `linux', `sunos4', `svr4', or `freebsd'. |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 24 | OS = @opsys@ |
Wichert Akkerman | c792698 | 2000-04-10 22:22:31 +0000 | [diff] [blame] | 25 | # ARCH is one of `i386', `m68k', `sparc', `arm', `mips' or `ia64'. |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 26 | ARCH = @arch@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 27 | # OSARCH is OS/ARCH if it exists, otherwise just OS. |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 28 | OSARCH = @osarch@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 29 | |
| 30 | # You may define any of MAX_PROCS, DEFAULT_STRLEN, DEFAULT_ACOLUMN, |
| 31 | # or DEFAULT_SORTBY here. |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 32 | EXTRA_DEFS = |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 33 | |
| 34 | # Where include files are located, useful for cross-compiling. |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 35 | includedir = @includedir@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 36 | |
| 37 | # Where to install the program: |
| 38 | # I recommend `/usr' for Linux, `/usr/local' for the others. |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 39 | prefix = @prefix@ |
| 40 | exec_prefix = @exec_prefix@ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 41 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 42 | bindir = @bindir@ |
| 43 | mandir = @mandir@ |
| 44 | man1dir = $(mandir)/man1 |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 45 | man1ext = .1 |
| 46 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 47 | SHELL = /bin/sh |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 48 | |
Wichert Akkerman | edf2dcc | 2001-02-16 20:14:40 +0000 | [diff] [blame] | 49 | INCLUDES = -I. -I$(OS)/$(ARCH) -I$(srcdir)/$(OS)/$(ARCH) -I$(OS) \ |
| 50 | -I$(srcdir)/$(OS) |
| 51 | SUBDIRS = $(OSARCH) |
| 52 | |
| 53 | ALL_SUBDIRS = test linux linux/alpha linux/powerpc sunos4 svr4 freebsd/i386 |
| 54 | OBJ = 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 Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 58 | |
| 59 | all: strace |
| 60 | |
| 61 | strace: $(OBJ) |
| 62 | $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS) |
| 63 | |
| 64 | install: all |
| 65 | $(INSTALL_PROGRAM) strace $(bindir)/strace |
Wichert Akkerman | aec6238 | 1999-11-28 01:56:12 +0000 | [diff] [blame] | 66 | $(INSTALL_PROGRAM) $(srcdir)/strace-graph $(bindir)/strace-graph |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 67 | $(INSTALL_DATA) $(srcdir)/strace.1 $(man1dir)/strace$(man1ext) |
| 68 | |
| 69 | clean: clean-local |
| 70 | for i in $(ALL_SUBDIRS); do \ |
| 71 | (test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \ |
| 72 | done; exit 0 |
| 73 | |
| 74 | clean-local: |
| 75 | rm -f *.o a.out core strace make.out |
| 76 | |
| 77 | distclean: distclean-local |
| 78 | for i in $(ALL_SUBDIRS); do \ |
| 79 | (test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \ |
| 80 | done; exit 0 |
| 81 | |
| 82 | distclean-local: clean-local |
| 83 | rm -f machine |
| 84 | rm -f Makefile config.h config.status config.cache config.log |
| 85 | |
| 86 | maintainer-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 | |
| 91 | maintainer-clean-local: distclean-local |
| 92 | |
| 93 | .c.o: |
| 94 | $(CC) $(WARNFLAGS) $(DEFS) $(EXTRA_DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $< |
| 95 | |
| 96 | desc.o: desc.c defs.h config.h |
| 97 | file.o: file.c defs.h config.h |
| 98 | io.o: io.c defs.h config.h |
| 99 | ioctl.o: ioctl.c defs.h config.h |
| 100 | mem.o: mem.c defs.h config.h |
| 101 | net.o: net.c defs.h config.h |
| 102 | process.o: process.c defs.h config.h |
| 103 | resource.o: resource.c defs.h config.h |
| 104 | signal.o: signal.c defs.h config.h |
| 105 | socket.o: socket.c defs.h config.h |
| 106 | strace.o: strace.c defs.h config.h |
| 107 | syscall.o: syscall.c defs.h config.h |
| 108 | system.o: system.c defs.h config.h |
| 109 | time.o: time.c defs.h config.h |
| 110 | util.o: util.c defs.h config.h |