|
|
1.1 root 1: # If you want or need to change something herein, please look approx. 30 lines
2: # below for the 'User Config Section'
3:
4: ########################################################################
5: # The next lines are hacks for automatic detection of different kernel setups.
6: # These things must happen first, please don't change them here. They can be
7: # overridden later.
8: #
9: # we try to guess some settings from kernel configuration :)
10: -include /usr/src/linux/.config
11: #
12: # guess some special flags for CPU type - used for optimization only
1.1.1.4 ! root 13: CPUFLAGS=-U__linux__ -fPIC
1.1 root 14: ifeq ($(CONFIG_M386),y)
15: CPUFLAGS= -m386 -DCPU=386 -DUSE_ASM
16: endif
17: ifeq ($(CONFIG_M486),y)
18: CPUFLAGS= -m486 -DCPU=486 -DUSE_ASM
19: endif
20: ifeq ($(CONFIG_M586),y)
21: CPUFLAGS= -m486 -DCPU=586 -DUSE_ASM
22: endif
1.1.1.2 root 23: # this one is new in 2.2.x kernels...
24: ifeq ($(CONFIG_M586TSC),y)
25: CPUFLAGS= -m486 -DCPU=586 -DUSE_ASM
26: endif
1.1 root 27: ifeq ($(CONFIG_M686),y)
28: CPUFLAGS= -m486 -DCPU=686 -DUSE_ASM
29: endif
1.1.1.2 root 30: # this one is new in 2.3.x kernels...
1.1.1.3 root 31: ifeq ($(CONFIG_MK6),y)
32: CPUFLAGS= -m486 -DCPU=586 -DUSE_ASM
33: endif
1.1.1.2 root 34: ifeq ($(CONFIG_MK7),y)
35: CPUFLAGS= -m486 -DCPU=686 -DUSE_ASM
36: endif
1.1 root 37: #
38: # Okay, that's it :)
39: ########################################################################
40:
41: ########################################################################
42: # *** User Config Section ***
43: # Here you can look for settings to change if the code refuses to compile
44: # out of the box. There are so many different systems. So many versions
45: # of compilers. So many different bugs. :(
46: #
47: # Select compiler
48: CC=gcc
49: #
50: # If cpu specific optimization fails, uncomment the next line to switch it
51: # off - there are some gas versions around that don't like the cpu specific
52: # asm instructions in dmsdos...
53: # CPUFLAGS=
54: #
55: # Some gnu assembler versions have a bug in the syntax for the xlat
56: # instruction. This enables a workaround. It should only be needed for very
57: # old binutils versions. I don't know for which ones :(
58: # CPUFLAGS+= -DGAS_XLAT_BUG
59: #
60: # The next lines should detect SMP configuration automatically.
61: # Comment them out or set it manually if it fails.
62: ifeq ($(SMP),1)
63: CPUFLAGS+= -D__SMP__
64: endif
1.1.1.2 root 65: # 2.2.x kernels have this one...
66: ifeq ($(CONFIG_SMP),y)
67: CPUFLAGS+= -D__SMP__
68: endif
1.1 root 69: #
70: # The next lines are for libc6 and enable some compatibility hacks -
71: # uncomment the line with -D__FOR_LIBC6 if the code does not compile
72: # *** Currently not used - code should compile under libc6 without hacks
73: LIBC6FLAGS=
74: #LIBC6FLAGS= -D__FOR_LIBC6
75: #
76: # CFLAGS for dmsdos module
77: # note: some macro expansions require at least -O
1.1.1.4 ! root 78: CFLAGS= -Wstrict-prototypes -O3 -fomit-frame-pointer
1.1 root 79: CFLAGS+= $(CPUFLAGS)
80: #
81: # The next lines add some stuff automatically for people using modversions
82: # if they fail, comment them out and set the required flags manually
83: ifeq ($(CONFIG_MODVERSIONS),y)
84: CFLAGS+= -DMODVERSIONS -include /usr/include/linux/modversions.h
85: endif
86: #
87: # CFLAGS for the dmsdos daemon
88: # note: some macro expansions require at least -O
1.1.1.4 ! root 89: DCFLAGS= -O3 -D__DMSDOS_DAEMON__
1.1 root 90: DCFLAGS+= $(CPUFLAGS)
91: #
92: # CFLAGS for the dmsdos library
93: # note: some macro expansions require at least -O
1.1.1.4 ! root 94: LCFLAGS= -O -ggdb -D__DMSDOS_LIB__ -DUSE_FLOCK
1.1 root 95: LCFLAGS+= $(CPUFLAGS) $(LIBC6FLAGS)
1.1.1.2 root 96: # uncomment the next line if you want a shared library
1.1.1.4 ! root 97: #LIB_SHARED = 1
1.1 root 98: #
99: # locations where to install the module, the executables and the manpages
100: # note: `uname -r` expands to the *currently running* kernel version - if it
101: # is different from that in /usr/src/linux you'd better edit the next line :)
102: MODULE_PREFIX=/lib/modules/`uname -r`/fs
103: #MODULE_PREFIX=/lib/modules/misc
104: EXEC_PREFIX=/usr/local/bin
105: #
106: # Okay, that's the end of the User Config Section.
107: ##########################################################################
108:
109: ##########################################################################
110: # The rest of this file are rules how to build which programs.
111:
1.1.1.4 ! root 112: without_kernel: dcread dmsdosfsck mcdmsdos cvflist cvftest
! 113:
1.1.1.2 root 114: all: dmsdos-config.h dmsdos.o dutil dmsdosd $(LIBDMSDOS) dcread dmsdosfsck \
115: mcdmsdos cvflist cvftest
1.1 root 116:
117: min: dmsdos-config.h dmsdos.o dutil
118:
119: dmsdos-config.h:
120: /bin/bash conf-wrapper.sh
121: make dep
122:
123: config:
124: /bin/bash Configure
125: make dep
126:
127: menuconfig:
128: /bin/bash Menuconfig
129: make dep
130:
131: dep:
132: ./check.sh
133: $(CC) -w -E -MM -D__KERNEL__ -D__MODULE__ -DMODULE dblspace*.c dstacker*.c > depend
134:
135: depend:
136: @touch depend
137:
138: DBL_OBJS = dblspace_compr.o dblspace_tables.o \
1.1.1.2 root 139: dblspace_alloc.o dblspace_dec.o dblspace_virtual.o \
140: dblspace_buffer.o dblspace_methsq.o \
141: dblspace_chk.o dblspace_interface.o \
142: dstacker_alloc.o dstacker_compr.o dstacker_dec.o \
143: dblspace_fileops.o dblspace_ioctl.o
1.1 root 144:
145: $(DBL_OBJS): dmsdos.h dmsdos-config.h
146:
1.1.1.2 root 147: dblspace_fileops.o : dblspace_fileops.c dblspace_fileops.c-2.0.33 \
1.1.1.3 root 148: dblspace_fileops.c-2.1.80 dblspace_fileops.c-2.3.99
1.1.1.2 root 149:
1.1 root 150: dmsdos.o: $(DBL_OBJS)
151: ld -r -o dmsdos.o $(DBL_OBJS)
152:
153: dutil: dutil.c dmsdos.h dmsdos-config.h
154: $(CC) $(DCFLAGS) -o dutil dutil.c
155:
156: DAEMON_OBJS = daemon_actions.do dblspace_compr.do dstacker_compr.do \
1.1.1.2 root 157: dblspace_methsq.do
1.1 root 158:
159: $(DAEMON_OBJS): dmsdos.h dmsdos-config.h
160:
161: %.do: %.c ; $(CC) -o $@ $(DCFLAGS) -c $<
162:
163: dmsdosd: $(DAEMON_OBJS)
164: $(CC) -o dmsdosd $^
165:
166: clean:
1.1.1.2 root 167: rm -f *.o *.a *.i *.s *.lo *.do *.so *.so.* dutil dmsdosd dcread \
168: dmsdosfsck cvftest cvflist mcdmsdos
1.1 root 169:
170: mrproper: clean
171: rm -f core *~ depend
172: rm -f .config* dmsdos-config.h .menuconfig*
173:
174: install: all
175: ./check.sh
1.1.1.4 ! root 176: install dcread $(EXEC_PREFIX)/dcread
1.1 root 177: install dmsdosfsck $(EXEC_PREFIX)/dmsdosfsck
1.1.1.2 root 178: install mcdmsdos $(EXEC_PREFIX)/mcdmsdos
179: install cvflist $(EXEC_PREFIX)/cvflist
180: install cvftest $(EXEC_PREFIX)/cvftest
1.1 root 181:
182: install-min: min
183: ./check.sh
184: install dmsdos.o $(MODULE_PREFIX)/dmsdos.o
185: install dutil $(EXEC_PREFIX)/dutil
186:
187: uninstall:
188: rm -f $(MODULE_PREFIX)/dmsdos.o
189: rm -f $(EXEC_PREFIX)/dutil
190: rm -f $(EXEC_PREFIX)/dmsdosd
191: rm -f $(EXEC_PREFIX)/dmsdosfsck
1.1.1.2 root 192: rm -f $(EXEC_PREFIX)/mcdmsdos
193: rm -f $(EXEC_PREFIX)/cvflist
194: rm -f $(EXEC_PREFIX)/cvftest
1.1 root 195:
196: messages:
197: grep DMSDOS ../doc/messages.doc | sort -d -b -f > /tmp/messdoc
198: ./listmsg.sh -LOG > /tmp/messsrc
199: diff -d -U 0 -w /tmp/messdoc /tmp/messsrc | grep DMSDOS
200:
201: LIB_OBJS = lib_interface.lo dblspace_interface.lo dblspace_dec.lo \
1.1.1.2 root 202: dblspace_compr.lo dblspace_methsq.lo dblspace_alloc.lo \
203: dblspace_chk.lo dblspace_tables.lo dstacker_compr.lo \
204: dstacker_dec.lo dstacker_alloc.lo
1.1 root 205:
206: $(LIB_OBJS): dmsdos.h dmsdos-config.h lib_interface.h
207:
1.1.1.2 root 208: ifndef LIB_SHARED
209:
210: LIBDMSDOS = libdmsdos.a
211:
1.1 root 212: %.lo: %.c ; $(CC) -o $@ $(LCFLAGS) -c $<
213:
1.1.1.2 root 214: $(LIBDMSDOS): $(LIB_OBJS)
215: ar rcs $(LIBDMSDOS) $^
216: ranlib $(LIBDMSDOS)
217:
218: else
219:
220: %.lo: %.c ; $(CC) --shared -o $@ $(LCFLAGS) -c $<
1.1 root 221:
1.1.1.2 root 222: LIBDMSDOS = libdmsdos.so.0.9.2
1.1 root 223:
1.1.1.2 root 224: $(LIBDMSDOS): $(LIB_OBJS)
1.1.1.4 ! root 225: gcc --shared -Xlinker --soname=$(LIBDMSDOS) -o $(LIBDMSDOS) $^
1.1.1.2 root 226: ln -s $(LIBDMSDOS) libdmsdos.so
1.1 root 227:
1.1.1.2 root 228: endif
229:
230: dcread: dcread.c $(LIBDMSDOS) dmsdos.h dmsdos-config.h
1.1 root 231:
1.1.1.2 root 232: mcdmsdos: mcdmsdos.c $(LIBDMSDOS) dmsdos.h dmsdos-config.h
233:
234: dmsdosfsck: dmsdosfsck.c $(LIBDMSDOS) dmsdos.h dmsdos-config.h
1.1 root 235:
236: cvftest: cvftest.c
237:
1.1.1.2 root 238: cvflist: cvflist.c
239:
1.1 root 240: -include depend
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.