Before you begin: Compile each source file and also bind it.
Perform the following steps to complete a final bind of all the partially bound units:
c89 -c -W c,"CSECT(myprog)" -o unit0.tmp unit0.c
c89 -r -o unit0.o unit0.tmp
rm unit0.tmp
c89 -c -W c,"CSECT(myprog)" -o unit1.tmp unit1.c
c89 -r -o unit1.o unit1.tmp
rm unit1.tmp
c89 -c -W c,"CSECT(myprog)" -o unit2.tmp unit2.c
c89 -r -o unit2.o unit2.tmp
rm unit2.tmp
The -r option supports rebindability by disabling autocall processing.
_______________________________________________________________
c89 -o myprog unit0.o unit1.o unit2.o
_______________________________________________________________
_C89_EXTRA_ARGS=1
.EXPORT : _C89_EXTRA_ARGS 1
PGM = myprog 2
SRCS = unit0.c unit1.c unit2.c 3
OBJS = $(SRCS:b:+".o") 4
COPTS = -W c,"CSECT(myprog)"
$(PGM) : $(OBJS) 5
c89 -o $(PGM) $(OBJS)
%.tmp : %.c 6
c89 -c -o $@ $(COPTS) $<
%.o : %.tmp 7
c89 -r -o $@ $<
In this example, make automatically removes the intermediate .tmp files after the makefile completes, since they are not marked as PRECIOUS. For more information on makefiles, see z/OS UNIX System Services Programming Tools.
Binding a set of partially bound program objects into a fully bound program object is faster than binding object modules into a fully bound program object for NOGOFF objects. For example, a central build group can create the partially bound program objects. Developers can then use these program objects and their changed object modules to create a development program object.