forget difference between big and small commands - obsolete with vm.
[minix.git] / commands / mdb / Makefile
blobf419d759c804cae9e20288b1556c942623fb4f83
2 # Makefile for mdb
5 # Edit as indicated below.
7 USR =/usr
9 # (1) For Compiler and target system:
12 # For ANSI C and Minix 1.7.x 32-bit
14 CC =exec cc
15 LD =exec cc
16 LDFLAGS =-i
17 TARGET =mdb
18 STACK =200000
20 # (2) If kernel and mm are not in "/usr/src" change this
22 SYSTEM =$(USR)/src
24 # (3) Select Options
26 # i) For GNU_EXEC Support, uncomment:
28 FOR_GNU =gnu_sym.o
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:
38 #DEF_DEBUG =-DNDEBUG
40 EXTRA_OBJS =$(FOR_GNU) $(FOR_SYSCALLS)
41 EXTRA_DEFS =$(DEF_GNU) $(DEF_SYSCALLS) $(DEF_DEBUG)
43 all: $(TARGET)
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 \
58 $(INCLUDE)/ansi.h \
59 $(INCLUDE)/minix/type.h \
60 $(INCLUDE)/limits.h \
61 $(INCLUDE)/errno.h \
62 $(INCLUDE)/sys/types.h \
63 $(KERNEL)/const.h \
64 $(KERNEL)/type.h \
65 $(KERNEL)/proc.h
67 # Common objects
69 OBJCOMMON =mdb.o mdbexp.o kernel.o sym.o trace.o core.o misc.o io.o
71 # Common source
73 SRCCOMMON =mdb.c mdbexp.c kernel.o sym.c trace.c core.c misc.c io.c
75 # Object files for PC
77 OBJPC =$(OBJCOMMON) mdbdis86.o
79 # Source file
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
108 # install
111 install: mdb
112 install -cs -o bin mdb /usr/bin
114 install_man: mdb.1
115 install -c -o bin mdb.1 /usr/man/man1
117 clean:
118 rm -f *.o mdb