summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 5cf059b754fbf1809de7b6239e3b13fdf0e38eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Makefile.in -- strace Makefile prototype                     -*- Makefile -*-
#
# $Id$
#

srcdir = @srcdir@
VPATH = @srcdir@

CC = @CC@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

DEFS = @DEFS@
LDLIBS = @LIBS@

CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
WARNFLAGS = @WARNFLAGS@

# OS is one of `linux', `sunos4', or `svr4'.
OS = @opsys@
# ARCH is one of `i386', `m68k', `sparc', or `mips'.
ARCH = @arch@
# OSARCH is OS/ARCH if it exists, otherwise just OS.
OSARCH = @osarch@

# You may define any of MAX_PROCS, DEFAULT_STRLEN, DEFAULT_ACOLUMN,
# or DEFAULT_SORTBY here.
EXTRA_DEFS =

# Where include files are located, useful for cross-compiling.
includedir = @includedir@

# Where to install the program:
# I recommend `/usr' for Linux, `/usr/local' for the others.
prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = $(exec_prefix)/bin
man1dir = $(prefix)/man/man1
man1ext = .1

SHELL = /bin/sh

INCLUDES = -I. -I$(OS)/$(ARCH) -I$(srcdir)/$(OS)/$(ARCH) -I$(OS) -I$(srcdir)/$(OS)
SUBDIRS = $(OSARCH)
ALL_SUBDIRS = test linux linux/alpha linux/powerpc sunos4 svr4
OBJ = strace.o version.o syscall.o util.o \
	desc.o file.o ipc.o io.o ioctl.o mem.o net.o process.o bjm.o \
	resource.o signal.o sock.o system.o term.o time.o proc.o stream.o

all: strace

strace: $(OBJ)
	$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)

install: all
	$(INSTALL_PROGRAM) strace $(bindir)/strace
	$(INSTALL_DATA) $(srcdir)/strace.1 $(man1dir)/strace$(man1ext)

clean: clean-local
	for i in $(ALL_SUBDIRS); do \
		(test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
	done; exit 0

clean-local:
	rm -f *.o a.out core strace make.out

distclean: distclean-local
	for i in $(ALL_SUBDIRS); do \
		(test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
	done; exit 0

distclean-local: clean-local
	rm -f machine
	rm -f Makefile config.h config.status config.cache config.log

maintainer-clean: maintainter-clean-local
	for i in $(ALL_SUBDIRS); do \
		(test -f $$i/Makefile && cd ./$$i && $(MAKE) $@ || true); \
	done; exit 0

maintainer-clean-local: distclean-local

.c.o:
	$(CC) $(WARNFLAGS) $(DEFS) $(EXTRA_DEFS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c $<

desc.o: desc.c defs.h config.h
file.o: file.c defs.h config.h
io.o: io.c defs.h config.h
ioctl.o: ioctl.c defs.h config.h
mem.o: mem.c defs.h config.h
net.o: net.c defs.h config.h
process.o: process.c defs.h config.h
resource.o: resource.c defs.h config.h
signal.o: signal.c defs.h config.h
socket.o: socket.c defs.h config.h
strace.o: strace.c defs.h config.h
syscall.o: syscall.c defs.h config.h
system.o: system.c defs.h config.h
time.o: time.c defs.h config.h
util.o: util.c defs.h config.h