5 # Edit as indicated below.
9 # (1) For Compiler and target system:
12 # For ANSI C and Minix 1.7.x 32-bit
20 # (2) If kernel and mm are not in "/usr/src" change this
26 # i) For GNU_EXEC Support, uncomment:
29 DEF_GNU
=-DGNU_SUPPORT
31 # ii) For tracing of syscalls, uncomment:
33 #FOR_SYSCALLS =syscalls.o decode.o ioctl.o
34 #DEF_SYSCALLS =-DSYSCALLS_SUPPORT
36 # iii) For no debugging of mdb, uncomment:
40 EXTRA_OBJS
=$(FOR_GNU
) $(FOR_SYSCALLS
)
41 EXTRA_DEFS
=$(DEF_GNU
) $(DEF_SYSCALLS
) $(DEF_DEBUG
)
45 CFLAGS
=-I
$(SYSTEM
) -I
$(SYSTEM
)/servers
-I
$(INCLUDE
) -D_MINIX
-D_POSIX_SOURCE
$(EXTRA_DEFS
)
47 # For various included files or system files
49 INCLUDE
=$(USR
)/include
50 KERNEL
=$(SYSTEM
)/kernel
51 PTRACE
=$(INCLUDE
)/sys
/ptrace.h
54 # Header files from system and kernel in "mdb.h"
56 SYSFILES
= $(INCLUDE
)/minix
/config.h \
57 $(INCLUDE
)/minix
/const.h \
59 $(INCLUDE
)/minix
/type.h \
62 $(INCLUDE
)/sys
/types.h \
69 OBJCOMMON
=mdb.o mdbexp.o kernel.o sym.o trace.o core.o misc.o io.o
73 SRCCOMMON
=mdb.c mdbexp.c kernel.o sym.c trace.c core.c misc.c io.c
77 OBJPC
=$(OBJCOMMON
) mdbdis86.o
81 SRCPC
=$(SRCCOMMON
) mdbdis86.c
84 mdb
: $(OBJPC
) $(EXTRA_OBJS
)
85 $(LD
) $(LDFLAGS
) -o mdb
$(OBJPC
) $(EXTRA_OBJS
)
86 install -S
$(STACK
) mdb
89 # Dependencies for objects
91 mdb.o
: mdb.c mdb.h
$(SYSFILES
) proto.h
92 mdbdis86.o
: mdbdis86.c mdb.h
$(SYSFILES
) proto.h
93 mdbexp.o
: mdbexp.c mdb.h
$(SYSFILES
) proto.h
94 sym.o
: sym.c mdb.h
$(SYSFILES
) proto.h
95 trace.o
: trace.c mdb.h
$(PTRACE
) $(SYSFILES
) proto.h
96 core.o
: core.c mdb.h
$(MMFILES
) $(SYSFILES
) proto.h
97 misc.o
: misc.c mdb.h
$(SYSFILES
) proto.h
98 io.o
: io.c mdb.h
$(SYSFILES
) proto.h
100 syscalls.o
: syscalls.c mdb.h
$(SYSFILES
) proto.h
101 decode.o
: decode.c mdb.h
$(INCLUDE
)/minix
/callnr.h
$(SYSFILES
) proto.h
102 ioctl.o
: ioctl.c mdb.h
$(SYSFILES
) proto.h
104 gnu_sym.o
: gnu_sym.c mdb.h
$(SYSFILES
) proto.h
112 install -cs
-o bin mdb
/usr
/bin
115 install -c
-o bin mdb
.1 /usr
/man
/man1