|
|
1.1 root 1: # Makefile for Mach 4 kernel directory
1.1.1.3 root 2: # Copyright 1997, 1999 Free Software Foundation, Inc.
1.1 root 3: #
4: # Permission to use, copy, modify and distribute this software and its
5: # documentation is hereby granted, provided that both the copyright
6: # notice and this permission notice appear in all copies of the
7: # software, derivative works or modified versions, and any portions
8: # thereof, and that both notices appear in supporting documentation.
1.1.1.3 root 9: #
1.1 root 10: # THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
11: # "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
12: # LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
13: # USE OF THIS SOFTWARE.
14:
15:
16:
17:
18: # Variables from `configure'.
19: srcdir=@srcdir@
20: systype=@systype@
21: prefix=@prefix@
1.1.1.4 ! root 22: version = @VERSION@
1.1 root 23:
24: exec_prefix=$(prefix)
25:
26: bootdir=$(exec_prefix)/boot
27: includedir=$(prefix)/include
28: libexecdir=$(exec_prefix)/libexec
29: bindir=$(exec_prefix)/bin
30:
31: sysdep = $(srcdir)/$(systype)
32:
1.1.1.2 root 33: # Detect if the user wants KDB
34: ifeq ($(findstring -DMACH_KDB,@DEFS@),-DMACH_KDB)
35: enable_kdb=yes
36: else
37: enable_kdb=no
38: endif
1.1 root 39:
1.1.1.3 root 40: # Detect if the user wants KMSG
41: ifeq ($(findstring -DMACH_KMSG,@DEFS@),-DMACH_KMSG)
42: enable_kmsg=yes
43: else
44: enable_kmsg=no
45: endif
46:
1.1 root 47: # Programs found by configure.
1.1.1.3 root 48: AWK = @AWK@
49: INSTALL = @INSTALL@
50: CC = @CC@
51: LD = @LD@
52: NM = @NM@
53: MIG = @MIG@
54:
55: INSTALL_PROGRAM = @INSTALL_PROGRAM@
56: INSTALL_DATA = @INSTALL_DATA@
57:
58: CFLAGS = @CFLAGS@
1.1 root 59:
60: all:
61:
62: # All the possible architectures
1.1.1.3 root 63: all-archs = i386 linux
1.1 root 64:
65: all-archs-subdirs = $(patsubst %,$(srcdir)/%/Subdirs,$(all-archs))
66: all-archs-files = $(patsubst %,$(srcdir)/%/Files,$(all-archs))
1.1.1.2 root 67: all-archs-configures = $(patsubst %,$(srcdir)/%/configure,$(all-archs))
1.1 root 68:
69: # Files distributed from the top level directory:
70: topfiles = ChangeLog ChangeLog.0 ChangeLog.00 Drivers.macros Makefile.in \
71: README INSTALL config.guess config.sub configure configure.in \
1.1.1.4 ! root 72: gensym.awk install-sh version.c.in NEWS aclocal.m4 COPYING
1.1 root 73:
1.1.1.3 root 74: # All the source in each directory.
1.1 root 75:
76: # Old crud from a previous configure scheme
77: bogus-files = bootstrap_symbols.h fast_tas.h hw_footprint.h net_atm.h \
78: power_save.h simple_clock.h stat_time.h xpr_debug.h \
79: $(patsubst %,mach_%.h,assert counters debug fixpri host ipc_compat \
80: ipc_debug ipc_test kdb ldebug lock_mon machine_routines mp_debug \
81: pagemap pcsample ttd vm_debug) \
82: $(patsubst %,norma_%.h,device ether ipc task vm)
83:
84: # Generic code for various hardware drivers
85: chips-files = atm.c audio.c bt431.c bt455.c bt459.c build_font.c busses.c \
86: cfb_hdw.c cfb_misc.c dc503.c dtop_handlers.c dtop_hdw.c dz_hdw.c \
87: fb_hdw.c fb_misc.c fdc_82077_hdw.c frc.c ims332.c isdn_79c30_hdw.c \
88: kernel_font.c lance.c lance_mapped.c lk201.c mc_clock.c mouse.c \
89: nc.c nw_mk.c pm_hdw.c pm_misc.c scc_8530_hdw.c screen.c \
90: screen_switch.c serial_console.c sfb_hdw.c sfb_misc.c spans.c \
91: tca100.c tca100_if.c xcfb_hdw.c xcfb_misc.c \
92: atmreg.h audio_config.h audio_defs.h bt431.h bt455.h bt459.h \
93: bt478.h busses.h dc503.h dtop.h dz_7085.h dz_defs.h eccreg.h \
94: fdc_82077.h ims332.h isdn_79c30.h lance.h lk201.h mc_clock.h \
95: nc.h nw.h nw_mk.h pm_defs.h scc_8530.h screen.h screen_defs.h \
96: screen_switch.h serial_defs.h spans.h tca100.h tca100_if.h \
97: vs42x_rb.h xcfb_monitor.h
98:
99: # Generic code for various SCSI unit types
100: scsi-files = disk_label.c mapped_scsi.c pc_scsi_label.c rz.c rz_audio.c \
101: rz_cpu.c rz_disk.c rz_disk_bbr.c rz_host.c rz_tape.c scsi.c \
102: scsi_alldevs.c scsi_comm.c scsi_cpu.c scsi_disk.c scsi_jukebox.c \
103: scsi_optical.c scsi_printer.c scsi_rom.c scsi_scanner.c \
104: scsi_tape.c scsi_worm.c \
105: compat_30.h mapped_scsi.h rz.h rz_labels.h scsi.h scsi2.h \
106: scsi_defs.h scsi_endian.h
107:
108: # Icky kernel debugger
109: ddb-cfiles = $(addprefix db_,$(ddb-names))
110: ddb-names = access.c aout.c break.c command.c cond.c examine.c expr.c \
111: ext_symtab.c input.c lex.c macro.c mp.c output.c print.c run.c \
112: sym.c task_thread.c trap.c variables.c watch.c write_cmd.c
113: ddb-files = $(ddb-cfiles) $(patsubst %,db_%.h, \
114: access break command expr lex output print run sym task_thread \
115: variables watch) nlist.h stab.h tr.h
116:
117: # Device support interfaces
118: device-files = blkio.c chario.c cirbuf.c cons.c dev_lookup.c dev_name.c \
119: dev_pager.c device_init.c dk_label.c ds_routines.c net_io.c subrs.c \
120: buf.h cirbuf.h conf.h cons.h dev_hdr.h dev_master.h device_port.h \
121: device_types_kernel.h ds_routines.h errno.h if_ether.h if_hdr.h \
1.1.1.3 root 122: io_req.h kmsg.c kmsg.h net_io.h param.h tty.h memory_object_reply.cli \
1.1 root 123: dev_forward.defs device_pager.srv device_reply.cli device.srv
124:
125: # IPC implementation
126: ipc-cfiles = $(addprefix ipc_,$(ipc-names)) \
127: mach_msg.c mach_port.c mach_rpc.c mach_debug.c fipc.c
128: ipc-names = entry.c hash.c init.c kmsg.c marequest.c mqueue.c \
129: notify.c object.c port.c pset.c right.c space.c splay.c \
1.1.1.3 root 130: table.c target.c thread.c
1.1 root 131: ipc-files = $(ipc-cfiles) mach_port.srv fipc.h port.h mach_msg.h \
132: $(patsubst %,ipc_%.h, \
133: entry hash init kmsg kmsg_queue machdep marequest mqueue notify \
134: object port pset right space splay table target thread types)
135:
136: # "kernel" implementation (tasks, threads, trivia, etc.)
137: kern-cfiles = act.c ast.c bootstrap.c counters.c debug.c eventcount.c \
138: exception.c host.c ipc_host.c ipc_kobject.c ipc_mig.c ipc_sched.c \
139: ipc_tt.c kalloc.c lock.c lock_mon.c mach_clock.c mach_factor.c \
140: machine.c pc_sample.c printf.c priority.c processor.c profile.c \
141: queue.c sched_prim.c startup.c strings.c syscall_emulation.c \
142: syscall_subr.c syscall_sw.c task.c thread.c thread_swap.c \
1.1.1.4 ! root 143: time_stamp.c timer.c xpr.c zalloc.c elf-load.c boot_script.c
1.1 root 144: kern-files = $(kern-cfiles) \
145: act.h assert.h ast.h compat_xxx_defs.h counters.h cpu_number.h \
146: debug.h eventcount.h host.h ipc_host.h ipc_kobject.h ipc_sched.h \
147: ipc_tt.h kalloc.h kern_types.h lock.h mach_param.h macro_help.h \
148: pc_sample.h processor.h queue.h refcount.h sched.h sched_prim.h \
149: shuttle.h strings.h syscall_emulation.h syscall_subr.h syscall_sw.h \
150: task.h thread.h thread_swap.h time_out.h time_stamp.h timer.h xpr.h \
1.1.1.4 ! root 151: zalloc.h boot_script.h \
1.1 root 152: mach.srv mach4.srv mach_debug.srv mach_host.srv
153:
154: # Still more trivia
155: util-cfiles = about_to_die.c cpu.c cpu_init.c die.c putchar.c puts.c
156: util-files = $(util-cfiles) config.h cpu.h cpu_subs.h cpus.h debug.h \
157: phys_mem.h ref_count.h
158:
159: # Virtual memory implementation
1.1.1.3 root 160: vm-cfiles = $(addprefix vm_,$(vm-names)) memory_object.c
1.1 root 161: vm-names = debug.c external.c fault.c init.c kern.c map.c \
162: object.c pageout.c resident.c user.c
163: vm-files = $(vm-cfiles) memory_object_default.cli memory_object_user.cli \
164: memory_object.h pmap.h $(patsubst %,vm_%.h, \
165: external fault kern map object page pageout user)
166:
1.1.1.4 ! root 167: # Documentation
! 168: doc-files = Makefile.in fdl.texi gpl.texi mach.texi
! 169:
! 170: # Debian packaging
! 171: debian-files = changelog control copyright README.Debian rules postinst prerm
1.1 root 172:
173:
174: # Object files that go into the kernel image. (This will be augmented by the
175: # machine dependent Makefile fragment.)
176:
177: # Basic kernel source for Mach
178: objfiles := $(subst .c,.o,$(ipc-cfiles) $(kern-cfiles) \
179: $(util-cfiles) $(vm-cfiles))
180: vpath %.c $(srcdir)/ipc $(srcdir)/kern $(srcdir)/util $(srcdir)/vm
181:
182: # These device support files are always needed; the others are needed only
183: # if particular drivers want the routines.
184: # XXX functions in device/subrs.c should each be moved elsewhere
185: objfiles += cons.o dev_lookup.o dev_name.o dev_pager.o device_init.o \
186: ds_routines.o subrs.o net_io.o blkio.o chario.o
1.1.1.3 root 187: ifeq ($(enable_kmsg),yes)
188: objfiles += kmsg.o
189: endif
1.1 root 190: vpath %.c $(srcdir)/device
191:
192: # DDB support -- eventually to die. Please.
193: objfiles += $(subst .c,.o,$(ddb-cfiles))
194: vpath %.c $(srcdir)/ddb
195:
196: # Version number
197: objfiles += version.o
198:
199:
200: # Header files installed for user use
201: device-headers= $(addprefix device/,audio_status.h bpf.h device.defs \
202: device_reply.defs device_request.defs device_types.defs \
203: device_types.h disk_status.h net_status.h tape_status.h \
204: tty_status.h)
205: mach-headers= $(addprefix mach/, bootstrap.defs default_pager.defs \
206: default_pager_helper.defs default_pager_types.defs \
207: exc.defs mach.defs mach4.defs mach_host.defs mach_norma.defs \
208: mach_port.defs mach_types.defs memory_object.defs \
209: memory_object_default.defs norma_task.defs notify.defs \
210: std_types.defs \
211: alert.h boolean.h boot.h default_pager_types.h exception.h \
212: host_info.h kern_return.h mach_param.h mach_types.h \
213: machine.h macro_help.h memory_object.h message.h mig_errors.h \
214: msg_type.h multiboot.h norma_special_ports.h notify.h \
1.1.1.4 ! root 215: pc_sample.h policy.h port.h processor_info.h \
1.1 root 216: profil.h profilparam.h rpc.h std_types.h syscall_sw.h \
217: task_info.h task_special_ports.h thread_info.h \
218: thread_special_ports.h thread_status.h thread_switch.h \
219: time_value.h version.h vm_attributes.h vm_inherit.h \
220: vm_param.h vm_prot.h vm_statistics.h inline.h)
221: mach-exec-headers= $(addprefix mach/exec/, a.out.h elf.h exec.h)
222: mach-debug-headers:= $(addprefix mach_debug/, hash_info.h ipc_info.h \
223: mach_debug.defs mach_debug_types.defs mach_debug_types.h \
224: pc_info.h vm_info.h zone_info.h)
225:
226: installed-headers:= $(device-headers) $(mach-headers) $(mach-exec-headers)
227:
1.1.1.3 root 228: # Other headers for the distribution. We don't install these, because the
1.1 root 229: # GNU C library has correct versions for users to use.
230: other-sys-headers := types.h time.h reboot.h ioctl.h
231: other-mach-headers := mig_support.h mach_traps.h error.h
232: other-headers := alloca.h
233:
234:
235: # Automatically generated source
236:
237: # User stubs
238: objfiles += memory_object_user_user.o memory_object_default_user.o \
239: device_reply_user.o memory_object_reply_user.o
240:
241: # Server stubs
242: objfiles += device_server.o device_pager_server.o mach_port_server.o \
243: mach_server.o mach4_server.o mach_debug_server.o mach_host_server.o
244:
245: # Where to find the relevant Mig source files
246: vpath %.cli $(srcdir)/vm $(srcdir)/device
247: vpath %.srv $(srcdir)/device $(srcdir)/ipc $(srcdir)/kern
248:
1.1.1.3 root 249:
250: # We need this symlink in place before we start compiling,
251: # so <mach/machine/foo.h> headers can be found.
252: before-compile = mach/machine
253: mach/machine: mach_machine
254: test -d $(@D) || mkdir $(@D)
255: rm -f $@
256: ln -s ../mach_machine mach/machine
257: mach_machine:
258: rm -f $@
259: ln -s $(srcdir)/$(systype)/include/mach/$(systype) mach_machine
1.1 root 260:
261:
262:
263: #
264: # Compilation flags
265: #
266:
1.1.1.2 root 267: DEFINES += -DMACH -DCMU -DMACH_KERNEL -DKERNEL @DEFS@
1.1 root 268: INCLUDES += -I. -I$(srcdir) -I$(srcdir)/include \
269: -I$(srcdir)/bogus -I$(srcdir)/util -I$(srcdir)/kern -I$(srcdir)/device
270:
271:
272: include $(sysdep)/Makefrag
273:
1.1.1.3 root 274: CPPFLAGS += -nostdinc $(DEFINES) $(INCLUDES)
1.1 root 275:
276: MIGFLAGS += $(CPPFLAGS)
277:
278:
1.1.1.2 root 279: # Standard targets
280:
1.1.1.3 root 281: all: kernel
1.1.1.2 root 282:
283: clean:
1.1.1.3 root 284: rm -f *.o *.d kernel
1.1.1.2 root 285: rm -f *.symc *.symc.o *_user.c *_server.c *.h
286: rm -f *.migs_d *.migsh_d *.migu_d *.miguh_d
287:
288: distclean: clean
1.1.1.3 root 289: rm -f config.status config.cache config.log Makefile driverlist
1.1.1.2 root 290:
291: mostlyclean: distclean
292:
293: maintainer-clean: mostlyclean
294: rm -f $(srcdir)/configure $(all-archs-configures)
295:
296: check:
1.1 root 297:
298:
299: #
300: # Kernel Image
301: #
1.1.1.4 ! root 302:
! 303: # This is the list of routines we decide is OK to steal from the C library.
! 304: clib-routines := memcpy memmove memset bcopy bzero \
! 305: strchr strstr strsep strpbrk strtok \
! 306: htonl htons ntohl ntohs \
! 307: etext edata end # actually ld magic, not libc
! 308:
! 309: #kernel.a: $(objfiles)
! 310: # @rm -f $@
! 311: # $(AR) cq $@ $^
! 312: kernel.o: $(objfiles) # kernel.a
! 313: $(LD) -r -o $@ $^
! 314: kernel-undef: kernel.o
! 315: $(NM) -u $< | sed 's/^_*//' | sort -u > $@
! 316: kernel-undef-bad: kernel-undef Makefile
! 317: sed '$(foreach r,$(clib-routines),/^$r$$/d;)' $< > $@
! 318: clib-routines.o: kernel-undef kernel-undef-bad
! 319: if test -s kernel-undef-bad; \
! 320: then cat kernel-undef-bad; exit 2; else true; fi
! 321: $(CC) -nostdlib -nostartfiles -r -static \
! 322: -o $@ \
! 323: `sed 's/^/-Wl,-u,/' $<` -x c /dev/null -lc
! 324: kernel: kernel.o clib-routines.o
! 325: $(LD) $(LDFLAGS) -o $@ $^
1.1 root 326:
327:
328:
329: #
330: # Installation
1.1.1.3 root 331: #
1.1 root 332: installed-headers-names = $(addprefix $(includedir)/,$(installed-headers))
333: installed-sysdep-headers-names = $(addprefix $(includedir)/,$($(systype)-installed-headers))
1.1.1.3 root 334: install: install-headers install-kernel
1.1 root 335:
336: $(installed-headers-names): $(includedir)/%: $(srcdir)/include/%
337: $(INSTALL_DATA) $< $@
338:
339: $(installed-sysdep-headers-names): $(includedir)/%: $(sysdep)/include/%
340: $(INSTALL_DATA) $< $@
341:
1.1.1.3 root 342: install-headers: mkheaderdirs $(installed-headers-names) $(installed-sysdep-headers-names)
343: ln -sf $(systype) $(includedir)/mach/machine
344:
345: install-kernel: kernel mkkerneldirs
346: $(INSTALL_PROGRAM) kernel $(bootdir)/gnumach
347:
348: mkheaderdirs:
349: mkdir -p $(includedir) $(includedir)/device $(includedir)/mach \
350: $(includedir)/mach/$(systype) $(includedir)/mach/exec
351:
352: mkkerneldirs:
353: mkdir -p $(bootdir)
1.1 root 354:
355:
356: #
357: # Building the distribution
358: #
359:
360: dist:
361: rm -rf gnumach-$(version)
362: mkdir gnumach-$(version)
363: # Directories
1.1.1.3 root 364: mkdir gnumach-$(version)/{bogus,chips,ddb,device,ipc,kern,scsi,util,vm,include}
1.1.1.4 ! root 365: mkdir gnumach-$(version)/{doc,debian}
1.1 root 366: mkdir gnumach-$(version)/include/{mach,device,mach_debug,sys}
367: mkdir gnumach-$(version)/include/mach/exec
368: for dir in `cat $(all-archs-subdirs)`; do \
369: mkdir -p gnumach-$(version)/$$dir; \
370: done
371: # Files
1.1.1.3 root 372: cp $(addprefix $(srcdir)/,$(topfiles)) gnumach-$(version)
373: cp $(addprefix $(srcdir)/bogus/,$(bogus-files)) gnumach-$(version)/bogus
374: cp $(addprefix $(srcdir)/chips/,$(chips-files)) gnumach-$(version)/chips
375: cp $(addprefix $(srcdir)/ddb/,$(ddb-files)) gnumach-$(version)/ddb
376: cp $(addprefix $(srcdir)/device/,$(device-files)) gnumach-$(version)/device
377: cp $(addprefix $(srcdir)/ipc/,$(ipc-files)) gnumach-$(version)/ipc
378: cp $(addprefix $(srcdir)/kern/,$(kern-files)) gnumach-$(version)/kern
379: cp $(addprefix $(srcdir)/scsi/,$(scsi-files)) gnumach-$(version)/scsi
380: cp $(addprefix $(srcdir)/util/,$(util-files)) gnumach-$(version)/util
381: cp $(addprefix $(srcdir)/vm/,$(vm-files)) gnumach-$(version)/vm
382: cp $(addprefix $(srcdir)/include/,$(mach-headers)) gnumach-$(version)/include/mach
383: cp $(addprefix $(srcdir)/include/,$(device-headers)) gnumach-$(version)/include/device
384: cp $(addprefix $(srcdir)/include/,$(mach-debug-headers)) gnumach-$(version)/include/mach_debug
385: cp $(addprefix $(srcdir)/include/,$(mach-exec-headers)) gnumach-$(version)/include/mach/exec
386: cp $(addprefix $(srcdir)/include/,$(other-headers)) gnumach-$(version)/include
387: cp $(addprefix $(srcdir)/include/sys/,$(other-sys-headers)) gnumach-$(version)/include/sys
388: cp $(addprefix $(srcdir)/include/mach/,$(other-mach-headers)) gnumach-$(version)/include/mach
1.1.1.4 ! root 389: cp $(addprefix $(srcdir)/doc/,$(doc-files)) gnumach-$(version)/doc
! 390: cp $(addprefix $(srcdir)/debian/,$(debian-files)) gnumach-$(version)/debian
1.1 root 391: # Files in arch dirs
392: for file in `cat $(all-archs-files)`; do \
1.1.1.3 root 393: cp $(srcdir)/$$file gnumach-$(version)/`dirname $$file`; \
1.1 root 394: done
1.1.1.3 root 395: chmod -R u=rwX,og=rX gnumach-$(version)
1.1.1.4 ! root 396: tar cf - gnumach-$(version) | gzip -9vc > gnumach-$(version).tar.gz
1.1 root 397: rm -rf gnumach-$(version)
398:
399:
400:
401: #
402: # Autoconf support
403: #
1.1.1.4 ! root 404: $(srcdir)/configure: $(srcdir)/configure.in
1.1 root 405: cd $(srcdir) && autoconf
1.1.1.4 ! root 406: $(srcdir)/config.h.in: $(srcdir)/acconfig.h
! 407: cd $(srcdir) && autoheader
1.1 root 408:
1.1.1.4 ! root 409: Makefile: $(srcdir)/Makefile.in config.status
! 410: ./config.status
! 411: config.h: stamp-configh ;
! 412: stamp-configh: $(srcdir)/config.h.in config.status
1.1 root 413: ./config.status
1.1.1.4 ! root 414: touch $@
1.1 root 415:
1.1.1.4 ! root 416: config.status: $(srcdir)/configure
1.1 root 417: ./config.status --recheck
418:
419: vpath %.in $(srcdir)
420: vpath configure $(srcdir)
421:
422:
423:
424: #
425: # How to do some things
1.1.1.3 root 426: #
1.1 root 427:
428: # Building foo.h from foo.sym:
1.1.1.4 ! root 429: %.symc: %.sym $(srcdir)/gensym.awk
! 430: $(AWK) -f $(word 2,$^) $< > $@
! 431: %.symc.o: %.symc $(before-compile)
1.1 root 432: $(CC) -S $(CPPFLAGS) $(CFLAGS) $(CPPFLAGS-$@) -x c -o $@ $<
433: %.h: %.symc.o
434: sed <$< -e 's/^[^*].*$$//' | \
435: sed -e 's/^[*]/#define/' -e 's/mAgIc[^-0-9]*//' >$@
436:
437: # Building from foo.cli
1.1.1.4 ! root 438: %.h %_user.c: %.cli $(before-compile)
1.1 root 439: $(MIG) $(MIGFLAGS) -header $*.h -user $*_user.c -server /dev/null $<
440:
441: # Building from foo.srv
1.1.1.4 ! root 442: %_interface.h %_server.c: %.srv $(before-compile)
! 443: $(MIG) $(MIGFLAGS) -sheader $*_interface.h -server $*_server.c \
! 444: -header /dev/null -user /dev/null $<
1.1 root 445:
446: #
447: # Dependency generation
448: #
449:
450: # Include dependency files
451: ifneq ($(no_deps),t)
452:
453: # For each file generated by MiG we need a .d file.
454: servers = $(filter %_server.o,$(objfiles))
1.1.1.3 root 455: -include $(subst _server.o,.migs_d,$(servers)) /dev/null
456: -include $(subst _server.o,.migsh_d,$(servers)) /dev/null
1.1 root 457:
458: # vm_user.o fits the pattern, but is not actually a MiG-related file.
459: users = $(filter-out vm_user.o,$(filter %_user.o,$(objfiles)))
1.1.1.3 root 460: -include $(subst _user.o,.migu_d,$(users)) /dev/null
461: -include $(subst _user.o,.miguh_d,$(users)) /dev/null
1.1 root 462:
463: # For each .o file we need a .d file.
1.1.1.3 root 464: -include $(subst .o,.d,$(filter %.o,$(objfiles))) /dev/null
1.1 root 465:
466: endif
467:
468: # Here is how to make those dependency files
469:
1.1.1.4 ! root 470: %.migs_d: %.srv $(before-compile)
1.1 root 471: (set -e; $(CPP) $(MIGFLAGS) -M -MG -x c $< | \
1.1.1.4 ! root 472: sed -e 's/[^:]*:/$(@:.migs_d=_server.c) $@:/' > $@)
1.1 root 473:
1.1.1.4 ! root 474: %.migu_d: %.cli $(before-compile)
1.1 root 475: (set -e; $(CPP) $(MIGFLAGS) -M -MG -x c $< | \
1.1.1.4 ! root 476: sed -e 's/[^:]*:/$(@:.migu_d=_user.c) $@:/' > $@)
1.1 root 477:
478: %.migsh_d: %.migs_d
479: sed -e 's/_server\.c /_interface.h /' -e 's/migs_d/migsh_d/' < $< > $@
480:
481: %.miguh_d: %.migu_d
482: sed -e 's/_user\.c /.h /' -e 's/migu_d/miguh_d/' < $< > $@
483:
484: # Generic rule for $(CC) based compilation for making dependencies
485: define make-deps
486: set -e; $(CC) $(CFLAGS) $(CPPFLAGS) -M -MG $< | \
487: sed > [email protected] -e 's/$*\.o:/$*.o $@:/'
488: mv -f [email protected] $@
489: endef
490:
1.1.1.3 root 491: %.d: %.c $(before-compile); $(make-deps)
492: %.d: %.S $(before-compile); $(make-deps)
1.1 root 493:
494: # .s files don't go through the preprocessor, so we do this
495: # This rule must come *after* the genuine ones above, so that
496: # make doesn't build a .s file and then make an empty dependency
497: # list.
498: %.d: %.s
499: echo '$*.o: $<' > $@
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.