home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / kludge03.tz / kludge03 / mk74 / user / libmach / makefile < prev    next >
Makefile  |  1992-08-29  |  19KB  |  517 lines

  1.  
  2. CP = cp
  3. RM = rm
  4. MV = mv
  5. CHMOD_BIN = echo
  6. CC = gcc -O2
  7. CPP = cpp
  8. AR = ar
  9. RANLIB = ranlib
  10. HOST_CC = gcc -O2
  11. CFLAGS = -I. -Imach -Imach:include
  12. HOST_CFLAGS = -Imach:include -Dyybgin=yy_start
  13. MIGFLAGS = -Imach:include -DMACH_IPC_COMPAT=0 -DSTANDALONE -DTypeCheck=0
  14.  
  15. #.s.o:
  16. #    gcc -c $(CFLAGS) $*.s
  17.  
  18. #-------
  19.  
  20. #
  21. # Mach Operating System
  22. # Copyright (c) 1992,1991,1990,1989 Carnegie Mellon University
  23. # All Rights Reserved.
  24. #
  25. # Permission to use, copy, modify and distribute this software and its
  26. # documentation is hereby granted, provided that both the copyright
  27. # notice and this permission notice appear in all copies of the
  28. # software, derivative works or modified versions, and any portions
  29. # thereof, and that both notices appear in supporting documentation.
  30. #
  31. # CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  32. # CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  33. # ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  34. #
  35. # Carnegie Mellon requests users of this software to return to
  36. #
  37. #  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  38. #  School of Computer Science
  39. #  Carnegie Mellon University
  40. #  Pittsburgh PA 15213-3890
  41. #
  42. # any improvements or extensions that they make and grant Carnegie Mellon
  43. # the rights to redistribute these changes.
  44. #
  45. #
  46. # HISTORY
  47. # $Log:    Makefile,v $
  48. # Revision 2.32  92/05/04  11:28:37  danner
  49. #     The unixoid trap cs files now have a define UNIXOID_TRAP 1 in
  50. #      them. This is for systems that need to generate different
  51. #      syscall stubs for unixoid and pure mach syscalls.
  52. #     [92/04/14            danner]
  53. #
  54. # Revision 2.31  92/04/08  23:19:52  rpd
  55. #     Fixed to remove tmp directory before creating it.
  56. #     [92/03/18            jvh]
  57. #
  58. # Revision 2.30  92/03/05  22:46:21  rpd
  59. #     Added bootstrap functions.
  60. #     [92/03/02            rpd]
  61. #
  62. #     Changed to use double-colon rules for top-level targets.
  63. #     [92/02/28            rpd]
  64. #
  65. # Revision 2.29  92/02/20  13:42:51  elf
  66. #     Added default_pager_paging_file.
  67. #     [92/02/19  17:37:12  af]
  68. #
  69. # Revision 2.28  92/02/19  16:07:29  elf
  70. #     Added thread_depress_abort.
  71. #     Added i386/memcpy.s.
  72. #     [92/02/19            elf]
  73. #
  74. # Revision 2.27  92/02/19  15:10:38  elf
  75. #     Added mach_error_string.o, htg_vm_map.o, panic.o,
  76. #     doprnt.o, printf.o, sprintf.o, get_privileged_ports.o.
  77. #     [92/02/11            rpd]
  78. #
  79. # Revision 2.26  92/02/19  10:51:30  elf
  80. #     Added SA_LUNA88K_OBJS. Updated Copyright.
  81. #     [92/02/19            danner]
  82. #
  83. # Revision 2.25  92/01/24  00:50:04  rpd
  84. #     Fixed exc_server.o to have type-checking.
  85. #     [92/01/23            rpd]
  86. #
  87. # Revision 2.24  92/01/23  15:21:49  rpd
  88. #     Revised for new Makefile organization.
  89. #     [92/01/16            rpd]
  90. #
  91.  
  92. # find machine-dependent files in machine subdirectory
  93. # find mig source files, mach/syscall_sw.h on CPATH
  94.  
  95. VPATH = .:${cpu}:${CPATH}
  96.  
  97. # top-level targets
  98.  
  99. TARGETS = libmach.a libmach_sa.a crt0.o
  100. ITARGETS = ${TARGETS;.*;${INSTALLDIR}/lib/&}
  101. TTARGETS = ${TARGETS;.*;${TRELEASEDIR}/lib/&}
  102.  
  103. all :: ${TARGETS}
  104.  
  105. install :: ${ITARGETS}
  106.  
  107. release :: ${TTARGETS}
  108.  
  109. clean ::
  110.     ${RM} ${ITARGETS}
  111.  
  112. ## installation rules
  113. #
  114. #${INSTALLDIR}/lib/libmach.a : libmach.a
  115. #    ${RM} $@
  116. #    ${CP} $? $@
  117. #    ${CHMOD_LIB} $@
  118. #
  119. #${INSTALLDIR}/lib/libmach_sa.a : libmach_sa.a
  120. #    ${RM} $@
  121. #    ${CP} $? $@
  122. #    ${CHMOD_LIB} $@
  123. #
  124. #${INSTALLDIR}/lib/crt0.o : crt0.o
  125. #    ${RM} $@
  126. #    ${CP} $? $@
  127. #    ${CHMOD_O} $@
  128. #
  129. ## release rules
  130. #
  131. #${TRELEASEDIR}/lib/libmach.a : ${FRELEASEDIR}/lib/libmach.a
  132. #    ${RM} $@
  133. #    ${CP} $? $@
  134. #
  135. #${TRELEASEDIR}/lib/libmach_sa.a : ${FRELEASEDIR}/lib/libmach_sa.a
  136. #    ${RM} $@
  137. #    ${CP} $? $@
  138. #
  139. #${TRELEASEDIR}/lib/crt0.o : ${FRELEASEDIR}/lib/crt0.o
  140. #    ${RM} $@
  141. #    ${CP} $? $@
  142.  
  143. # normal Mach system calls from mach/syscall_sw.h
  144.  
  145. MACH_TRAPS = evc_wait mach_msg_trap mach_reply_port mach_thread_self \
  146.     mach_task_self mach_host_self swtch_pri swtch thread_switch
  147.  
  148. # system calls from mach/syscall_sw.h which the kernel doesn't implement
  149.  
  150. UNIXOID_TRAPS = task_by_pid pid_by_task init_process map_fd \
  151.     rfs_make_symlink htg_syscall
  152.  
  153. # routines from mach/mach.defs which have fast syscall versions
  154.  
  155. MACH_SYSCALLS = vm_allocate vm_map vm_deallocate task_create \
  156.     task_terminate task_suspend task_set_special_port \
  157.     thread_depress_abort
  158.  
  159. # other routines from mach/mach.defs
  160.  
  161. MACH_ROUTINES = task_threads thread_terminate vm_protect vm_inherit \
  162.     vm_read vm_write vm_copy vm_region vm_statistics \
  163.     mach_ports_register mach_ports_lookup \
  164.     memory_object_data_provided memory_object_data_unavailable \
  165.     memory_object_get_attributes vm_set_default_memory_manager \
  166.     memory_object_lock_request task_get_emulation_vector \
  167.     task_set_emulation_vector task_resume task_get_special_port \
  168.     task_info thread_create thread_suspend thread_resume \
  169.     thread_abort thread_get_state thread_set_state \
  170.     thread_get_special_port thread_set_special_port thread_info \
  171.     task_set_emulation memory_object_data_error \
  172.     memory_object_set_attributes memory_object_destroy \
  173.     memory_object_data_supply memory_object_ready \
  174.     memory_object_change_attributes vm_machine_attribute
  175.  
  176. # routines from mach/mach_port.defs which have fast syscall versions
  177.  
  178. MACH_PORT_SYSCALLS = mach_port_allocate mach_port_allocate_name \
  179.     mach_port_deallocate mach_port_insert_right
  180.  
  181. # other routines from mach/mach_port.defs
  182.  
  183. MACH_PORT_ROUTINES = mach_port_names mach_port_type mach_port_rename \
  184.     mach_port_destroy mach_port_get_refs mach_port_mod_refs \
  185.     old_mach_port_get_receive_status mach_port_set_qlimit \
  186.     mach_port_set_mscount mach_port_get_set_status \
  187.     mach_port_move_member mach_port_request_notification \
  188.     mach_port_extract_right mach_port_get_receive_status \
  189.     mach_port_set_seqno
  190.  
  191. # routines from device/device.defs
  192.  
  193. DEVICE_ROUTINES = device_open device_close device_write \
  194.     device_write_inband device_read device_read_inband \
  195.     device_set_status device_get_status device_set_filter device_map
  196.  
  197. # routines from mach/mach_host.defs
  198.  
  199. MACH_HOST_ROUTINES = host_processors host_info processor_info \
  200.     processor_start processor_exit processor_control \
  201.     processor_set_default xxx_processor_set_default_priv \
  202.     processor_set_create processor_set_destroy processor_set_info \
  203.     processor_assign processor_get_assignment thread_assign \
  204.     thread_assign_default thread_get_assignment task_assign \
  205.     task_assign_default task_get_assignment host_kernel_version \
  206.     thread_priority thread_max_priority task_priority \
  207.     processor_set_max_priority thread_policy \
  208.     processor_set_policy_enable processor_set_policy_disable \
  209.     processor_set_tasks processor_set_threads host_processor_sets \
  210.     host_processor_set_priv host_set_time host_adjust_time \
  211.     host_get_time host_reboot vm_wire thread_wire
  212.  
  213. # routines from mach_debug/mach_debug.defs
  214.  
  215. MACH_DEBUG_ROUTINES = host_zone_info mach_port_get_srights \
  216.     host_ipc_hash_info host_ipc_marequest_info mach_port_space_info \
  217.     mach_port_dnrequest_info mach_vm_region_info mach_vm_object_info \
  218.     mach_vm_object_pages host_stack_usage processor_set_stack_usage \
  219.     host_virtual_physical_table_info host_load_symbol_table \
  220.     mach_port_kernel_object
  221.  
  222. # routines from mach/default_pager.defs
  223.  
  224. DPAGER_ROUTINES = default_pager_object_create default_pager_info \
  225.     default_pager_objects default_pager_object_pages \
  226.     default_pager_paging_file
  227.  
  228. # routines from mach/bootstrap.defs
  229.  
  230. BOOTSTRAP_ROUTINES = bootstrap_privileged_ports
  231.  
  232. # all system calls from mach/syscall_sw.h
  233.  
  234. PURE_TRAPS = ${MACH_TRAPS} \
  235.     ${MACH_SYSCALLS/.*/syscall_&} ${MACH_PORT_SYSCALLS/.*/syscall_&}
  236.  
  237. ALL_TRAPS = ${PURE_TRAPS} ${UNIXOID_TRAPS}
  238.  
  239. ## mig rules to generate intermediate source files in the object directory
  240. #
  241. #${UNIXOID_TRAPS/.*/&.cs} : mach/syscall_sw.h
  242. #    { echo '#define UNIXOID_TRAP 1'; \
  243. #       echo '#include <mach/machine/syscall_sw.h>'; \
  244. #      egrep '^kernel_trap\($*,' mach/syscall_sw.h; } > $@
  245. #
  246. #${PURE_TRAPS/.*/&.cs} : mach/syscall_sw.h
  247. #    { echo '#include <mach/machine/syscall_sw.h>'; \
  248. #      egrep '^kernel_trap\($*,' mach/syscall_sw.h; } > $@
  249. #
  250. #MIG_SYSCALL_SRCS = ${MACH_SYSCALLS/.*/mig_&.c} ${MACH_PORT_SYSCALLS/.*/mig_&.c}
  251. #
  252. #${MIG_SYSCALL_SRCS} : $${@/mig_(.*)\.c/\1.c}
  253. #    name=${@/mig_(.*)\.c/\1}; \
  254. #    sed -e "s/$${name}/mig_$${name}/g" < $${name}.c > mig_$${name}.c
  255.  
  256. MACH_USER_SRCS = task_threads.c thread_terminate.c vm_protect.c vm_inherit.c \
  257.     vm_read.c vm_write.c vm_copy.c vm_region.c vm_statistics.c \
  258.     mach_ports_register.c mach_ports_lookup.c \
  259.     memory_object_data_provided.c memory_object_data_unavailable.c \
  260.     memory_object_get_attributes.c vm_set_default_memory_manager.c \
  261.     memory_object_lock_request.c task_get_emulation_vector.c \
  262.     task_set_emulation_vector.c task_resume.c task_get_special_port.c \
  263.     task_info.c thread_create.c thread_suspend.c thread_resume.c \
  264.     thread_abort.c thread_get_state.c thread_set_state.c \
  265.     thread_get_special_port.c thread_set_special_port.c thread_info.c \
  266.     task_set_emulation.c memory_object_data_error.c \
  267.     memory_object_set_attributes.c memory_object_destroy.c \
  268.     memory_object_data_supply.c memory_object_ready.c \
  269.     memory_object_change_attributes.c vm_machine_attribute.c \
  270.     vm_allocate.c vm_map.c vm_deallocate.c task_create.c \
  271.     task_terminate.c task_suspend.c task_set_special_port.c \
  272.     thread_depress_abort.c
  273. MACH_SRCS = mach_interface.h ${MACH_USER_SRCS} mach_server.c
  274.  
  275. ${MACH_SRCS} : mach/mach.defs
  276.     $(CPP) ${MIGFLAGS} -I. <mach/mach.defs >t:o
  277.     ${MIG} -i ./ -user mach_user.c -header mach_interface.h -server mach_server.c <t:o
  278.  
  279. MACH_PORT_USER_SRCS = mach_port_names.c mach_port_type.c mach_port_rename.c \
  280.     mach_port_destroy.c mach_port_get_refs.c mach_port_mod_refs.c \
  281.     old_mach_port_get_receive_status.c mach_port_set_qlimit.c \
  282.     mach_port_set_mscount.c mach_port_get_set_status.c \
  283.     mach_port_move_member.c mach_port_request_notification.c \
  284.     mach_port_extract_right.c mach_port_get_receive_status.c \
  285.     mach_port_set_seqno.c mach_port_allocate.c mach_port_allocate_name.c \
  286.     mach_port_deallocate.c mach_port_insert_right.c
  287. MACH_PORT_SRCS = mach_port.h ${MACH_PORT_USER_SRCS} mach_port_server.c
  288.  
  289. ${MACH_PORT_SRCS} : mach/mach_port.defs
  290.     $(CPP) ${MIGFLAGS} -I. <mach/mach_port.defs >t:o
  291.     ${MIG} -i ./ -user '$${MACH_PORT_USER_SRCS}' -server mach_port_server.c <t:o
  292.  
  293. DEVICE_USER_SRCS = device_open.c device_close.c device_write.c \
  294.     device_write_inband.c device_read.c device_read_inband.c \
  295.     device_set_status.c device_get_status.c device_set_filter.c device_map.c
  296. DEVICE_SRCS = device.h ${DEVICE_USER_SRCS} device_server.c
  297.  
  298. ${DEVICE_SRCS} : device/device.defs
  299.     $(CPP) ${MIGFLAGS} -I. <device/device.defs >t:o
  300.     ${MIG} -i ./ -user '$${DEVICE_USER_SRCS}' -server device_server.c <t:o
  301.  
  302. MACH_HOST_USER_SRCS = host_processors.c host_info.c processor_info.c \
  303.     processor_start.c processor_exit.c processor_control.c \
  304.     processor_set_default.c xxx_processor_set_default_priv.c \
  305.     processor_set_create.c processor_set_destroy.c processor_set_info.c \
  306.     processor_assign.c processor_get_assignment.c thread_assign.c \
  307.     thread_assign_default.c thread_get_assignment.c task_assign.c \
  308.     task_assign_default.c task_get_assignment.c host_kernel_version.c \
  309.     thread_priority.c thread_max_priority.c task_priority.c \
  310.     processor_set_max_priority.c thread_policy.c \
  311.     processor_set_policy_enable.c processor_set_policy_disable.c \
  312.     processor_set_tasks.c processor_set_threads.c host_processor_sets.c \
  313.     host_processor_set_priv.c host_set_time.c host_adjust_time.c \
  314.     host_get_time.c host_reboot.c vm_wire.c thread_wire.c
  315. MACH_HOST_SRCS = mach_host.h ${MACH_HOST_USER_SRCS} mach_host_server.c
  316.  
  317. ${MACH_HOST_SRCS} : mach/mach_host.defs
  318.     $(CPP) ${MIGFLAGS} -I. <mach/mach_host.defs >t:o
  319.     ${MIG} -i ./ -user '$${MACH_HOST_USER_SRCS}' -server mach_host_server.c <t:o
  320.  
  321. #MACH_DEBUG_USER_SRCS = ${MACH_DEBUG_ROUTINES/.*/&.c}
  322. #MACH_DEBUG_SRCS = mach_debug.h ${MACH_DEBUG_USER_SRCS} mach_debug_server.c
  323. #
  324. #${MACH_DEBUG_SRCS} : mach_debug/mach_debug.defs
  325. #    ${MIG} ${MIGFLAGS} -i ./ -user '$${MACH_DEBUG_USER_SRCS}' -server mach_debug_server.c mach_debug/mach_debug.defs
  326.  
  327. DPAGER_USER_SRCS = default_pager_object_create.c default_pager_info.c \
  328.     default_pager_objects.c default_pager_object_pages.c \
  329.     default_pager_paging_file.c
  330. DPAGER_SRCS = default_pager.h ${DPAGER_USER_SRCS} default_pager_server.c
  331.  
  332. ${DPAGER_SRCS} : mach/default_pager.defs
  333.     $(CPP) ${MIGFLAGS} -I. <mach/default_pager.defs >t:o
  334.     ${MIG} -i ./ -user '$${DPAGER_USER_SRCS}' -server default_pager_server.c <t:o
  335.  
  336. BOOTSTRAP_USER_SRCS = bootstrap_privileged_ports.c
  337. BOOTSTRAP_SRCS = bootstrap.h ${BOOTSTRAP_USER_SRCS} bootstrap_server.c
  338.  
  339. ${BOOTSTRAP_SRCS} : mach/bootstrap.defs
  340.     $(CPP) ${MIGFLAGS} -I. <mach/bootstrap.defs >t:o
  341.     ${MIG} -i ./ -user '$${BOOTSTRAP_USER_SRCS}' -server bootstrap_server.c <t:o
  342.  
  343. EXC_SRCS = exc.h exc_user.c exc_server.c
  344.  
  345. ${EXC_SRCS} : mach/exc.defs
  346.     $(CPP) ${MIGFLAGS} -I. <mach/exc.defs >t:o
  347.     ${MIG} -user exc_user.c -server exc_server.c <t:o
  348.  
  349. NOTIFY_SRCS = notify_user.h notify_user.c notify_server.c
  350.  
  351. ${NOTIFY_SRCS} : mach/notify.defs
  352.     $(CPP) ${MIGFLAGS} -I. <mach/notify.defs >t:o
  353.     ${MIG} -header notify_user.h -user notify_user.c -server notify_server.c <t:o
  354.  
  355. seqnos_notify_server.c : mach/notify.defs
  356.     $(CPP) ${MIGFLAGS} -DSEQNOS -I. <mach/notify.defs >t:o
  357.     ${MIG} -header /dev/null -user /dev/null -server seqnos_notify_server.c <t:o
  358.  
  359. MEMORY_OBJECT_SRCS = memory_object_user.h \
  360.     memory_object_user.c memory_object_server.c
  361.  
  362. ${MEMORY_OBJECT_SRCS} : mach/memory_object.defs
  363.     $(CPP) ${MIGFLAGS} -I. <mach/memory_object.defs >t:o
  364.     ${MIG} -header memory_object_user.h -user memory_object_user.c -server memory_object_server.c <t:o
  365.  
  366. seqnos_memory_object_server.c : mach/memory_object.defs
  367.     $(CPP) ${MIGFLAGS} -DSEQNOS -I. <mach/memory_object.defs >t:o
  368.     ${MIG} -header /dev/null -user /dev/null -server seqnos_memory_object_server.c <t:o
  369.  
  370. MEMORY_OBJECT_DEFAULT_SRCS = memory_object_default.h \
  371.     memory_object_default_user.c mem_ob_def_serv.c
  372.  
  373. ${MEMORY_OBJECT_DEFAULT_SRCS} : mach/memory_object_default.defs
  374.     $(CPP) ${MIGFLAGS} -I. <mach/memory_object_default.defs >t:o
  375.     ${MIG} -header memory_object_default.h -user memory_object_default_user.c -server memory_object_default_server.c <t:o
  376.  
  377. seqnos_mem_ob_def_serv.c : mach/memory_object_default.defs
  378.     $(CPP) ${MIGFLAGS} -DSEQNOS -I. <mach/memory_object_default.defs >t:o
  379.     ${MIG} -header /dev/null -user /dev/null -server seqnos_memory_object_default_server.c <t:o
  380.  
  381. DEVICE_REQUEST_SRCS = device_request.h device_request_user.c
  382.  
  383. ${DEVICE_REQUEST_SRCS} : device/device_request.defs
  384.     $(CPP) ${MIGFLAGS} -I. <device/device_request.defs >t:o
  385.     ${MIG} -user device_request_user.c -server /dev/null <t:o
  386.  
  387. DEVICE_REPLY_SRCS = device_reply_server.c
  388.  
  389. ${DEVICE_REPLY_SRCS} : device/device_reply.defs
  390.     $(CPP) ${MIGFLAGS} -I. <device/device_reply.defs >t:o
  391.     ${MIG} -server device_reply_server.c -header /dev/null -user /dev/null <t:o
  392.  
  393. NORMA_SRCS = mach_norma.h mach_norma_user.c mach_norma_server.c
  394.  
  395. ${NORMA_SRCS} : mach/mach_norma.defs
  396.     ${MIG} ${MIGFLAGS} -user mach_norma_user.c -server mach_norma_server.c mach/mach_norma.defs
  397.  
  398. MACH_I386_SRCS = mach_i386.h mach_i386_user.c mach_i386_server.c
  399.  
  400. ${MACH_I386_SRCS} : mach/i386/mach_i386.defs
  401.     ${MIG} ${MIGFLAGS} -user mach_i386_user.c -server mach_i386_server.c mach/i386/mach_i386.defs
  402.  
  403. # This is a funny one.  We do the mig into a temporary directory and
  404. # then pick out the one file that we actually want.  We use a
  405. # temporary directory to avoid interfering with the files normally
  406. # generated from mach/mach.defs.  We use htg_vm_map.defs instead of
  407. # using mach/mach.defs directly so that the dependencies show up in
  408. # htg_vm_map.defs.d instead of overwriting mach.defs.d.
  409.  
  410. htg_vm_map.c : htg_vm_map.defs
  411.     -${RM} -r tmp
  412.     mkdir tmp
  413.     $(CPP) ${MIGFLAGS} -DEMULATOR -I. <device/device_reply.defs >t:o
  414.     ${MIG} -i tmp/ -user htg_vm_map.c -header tmp/mach_interface.h -server /dev/null <t:o
  415.     mv tmp/htg_vm_map.c htg_vm_map.c
  416.  
  417. htg_vm_map.defs : mach/mach.defs
  418.     -ln -s $? $@
  419.  
  420. htg_vm_map.o : mach_interface.h
  421.  
  422. ## mig generated code normally does stringent type-checking of received
  423. ## messages.  We disable this type-checking (for performance reasons)
  424. ## on messages that are received from the kernel, because the kernel
  425. ## is trusted to send correct messages.  Exceptions:
  426. ##    mach_debug user stubs - the mach_debug interface changes often,
  427. ##        so type-checking is useful to catch version skew
  428. ##    exc_server.c - users also have access to exception ports and
  429. ##        can make exception RPCs directly
  430. #
  431. #NO_TYPE_CHECK_SRCS = ${MACH_USER_SRCS} ${MACH_PORT_USER_SRCS} \
  432. #    ${MIG_SYSCALL_SRCS} ${DEVICE_USER_SRCS} ${MACH_HOST_USER_SRCS} \
  433. #    notify_server.c seqnos_notify_server.c \
  434. #    memory_object_server.c seqnos_memory_object_server.c \
  435. #    mem_ob_def_serv.c \
  436. #    seqnos_mem_ob_def_serv.c device_request_user.c \
  437. #    device_reply_server.c mach_norma_user.c mach_i386_user.c \
  438. #    htg_vm_map.c bootstrap_server.c ${BOOTSTRAP_USER_SRCS}
  439. #
  440. #NO_TYPE_CHECK_OBJS = ${NO_TYPE_CHECK_SRCS/(.*)\.c/\1.o}
  441. #
  442. #${NO_TYPE_CHECK_OBJS} : $${@/(.*)\.o/\1.c}
  443. #    ${CC} -c ${CFLAGS} -DTypeCheck=0 ${@/(.*)\.o/\1.c}
  444.  
  445. # rules to generate the libraries
  446.  
  447. MACH_OBJS = mach_init.o mach_msg.o mach_msg_send.o mach_msg_receive.o \
  448.     mach_msg_destroy.o  mach_msg_server.o
  449.  
  450. MIG_OBJS = mig_support.o mig_strncpy.o \
  451.     mig_allocate.o mig_deallocate.o mig_reply_setup.o
  452.  
  453. USER_OBJS = slot_name.o error_codes.o mach_error_string.o
  454.  
  455. LIBC_OBJS = sbrk.o Ovfork.o
  456.  
  457. PURE_I386_OBJS = mach_i386_user.o
  458.  
  459. PURE_OBJS = ${MACH_OBJS} ${MIG_OBJS} ${USER_OBJS} \
  460.     ${PURE_${TARGET_MACHINE}_OBJS} \
  461.     device_request_user.o device_reply_server.o \
  462.     exc_user.o exc_server.o \
  463.     memory_object_server.o seqnos_memory_object_server.o \
  464.     mem_ob_def_serv.o seqnos_mem_ob_def_serv.o \
  465.     notify_user.o notify_server.o seqnos_notify_server.o \
  466.     mach_server.o mach_port_server.o mach_host_server.o \
  467.     device_server.o \
  468.     default_pager_server.o memory_object_user.o \
  469.     memory_object_default_user.o ${PURE_TRAPS/.*/&.o} \
  470.     ${MACH_SYSCALLS/.*/ms_&.o} ${MACH_SYSCALLS/.*/mig_&.o} \
  471.     ${MACH_PORT_SYSCALLS/.*/ms_&.o} ${MACH_PORT_SYSCALLS/.*/mig_&.o} \
  472.     ${MACH_ROUTINES/.*/&.o} ${MACH_PORT_ROUTINES/.*/&.o} \
  473.     ${DEVICE_ROUTINES/.*/&.o} ${MACH_HOST_ROUTINES/.*/&.o} \
  474.     ${MACH_DEBUG_ROUTINES/.*/&.o} ${DPAGER_ROUTINES/.*/&.o} \
  475.     bootstrap_server.o ${BOOTSTRAP_ROUTINES/.*/&.o}
  476.  
  477. UNIXOID_OBJS = mach_init_ports.o mach_error.o \
  478.     ${LIBC_OBJS} ${UNIXOID_TRAPS/.*/&.o}
  479.  
  480. SA_VAX_OBJS     = urem.o udiv.o
  481. SA_SUN3_OBJS    = start_float.o
  482. SA_I386_OBJS    = gcc.o memcpy.o
  483. SA_I860_OBJS    = pre_crt0.o
  484. SA_LUNA88K_OBJS = gcc.o
  485.  
  486. SA_OBJS = mach_init_sa.o ${SA_${TARGET_MACHINE}_OBJS} \
  487.     exit.o _setjmp.o bzero.o bcopy.o \
  488.     strcmp.o strlen.o strncpy.o strcat.o strcpy.o \
  489.     doprnt.o printf.o sprintf.o panic.o \
  490.     get_privileged_ports.o
  491.  
  492.  
  493. LIBMACH_OBJS = ${PURE_OBJS} ${UNIXOID_OBJS}
  494.  
  495. libmach.a : ${LIBMACH_OBJS}
  496.     -${RM} $@
  497.     ${AR} cq $@ ${LIBMACH_OBJS}
  498. #    ${RANLIB} $@
  499.  
  500. LIBMACH_SA_OBJS = ${PURE_OBJS} ${SA_OBJS}
  501.  
  502. libmach_sa.a : ${LIBMACH_SA_OBJS}
  503.     -${RM} $@
  504.     ${AR} cq $@ ${LIBMACH_SA_OBJS}
  505. #    ${RANLIB} $@
  506.  
  507. # Special '.cc' suffix for putting crt0 thru cpp twice.
  508.  
  509. .SUFFIXES: .cc
  510.  
  511. .cc.o:
  512.     ${CP} $*.cc $*.c
  513.     ${CC} -S -DCRT0 $*.c
  514.     ${CPP} $*.s > $*.i
  515.     ${AS} ${ASFLAGS} -o $*.o $*.i
  516.  
  517.