# Makefile for OS/2.  Assumes IBM's compiler, static linking, and a single thread.
# Adding dynamic linking support seems easy, but takes a little bit of work.
# Adding thread support may be nontrivial, since we haven't yet figured out how to
# look at another threads registers.

# We also haven't figured out how to do partial links or build static libraries.  Hence a
# client currently needs to link against all of the following:

OBJS= alloc.obj reclaim.obj allochblk.obj misc.obj mach_dep.obj os_dep.obj mark_roots.obj headers.obj mark.obj obj_map.obj black_list.obj finalize.obj new_hblk.obj real_malloc.obj dynamic_load.obj debug_malloc.obj

CC= icc
CFLAGS= /O /Q
# Use /Ti instead of /O for debugging
# Setjmp_test may yield overly optimistic results when compiled
# without optimization.

all: $(OBJS) gctest

$(OBJS) test.obj: gc_private.h gc_headers.h gc.h

mach_dep.obj: mach_dep.c
	$(CC) $(CFLAGS) /C mach_dep.c

gctest: test.obj $(OBJS)
	$(CC) $(CFLAGS) /Fegctest test.obj $(OBJS)

