# This Makefile is for all examples

All : libhello.dl Makefile

libhello.dl : hello1.o hello1_chdl.o \
               hello2.o hello2_chdl.o \
               hello3.o hello3_chdl.o \
               testarray.o testarray_chdl.o \
               sum1.o sum1_chdl.o \
               sum2.o sum2_chdl.o \
               retstruct.o retstruct_chdl.o \
               ret_comp_arr_chdl.o comp_array.o
	ch dllink libhello.dl hello1.o hello1_chdl.o \
                               hello2.o hello2_chdl.o \
                               hello3.o hello3_chdl.o \
                               testarray.o testarray_chdl.o \
                               sum1.o sum1_chdl.o \
                               sum2.o sum2_chdl.o \
                               retstruct.o retstruct_chdl.o \
                               ret_comp_arr_chdl.o comp_array.o

hello1.o : hello1.c
	ch dlcomp libhello.dl hello1.c

hello1_chdl.o : hello1_chdl.c
	ch dlcomp libhello.dl hello1_chdl.c

hello2.o : hello2.c
	ch dlcomp libhello.dl hello2.c

hello2_chdl.o : hello2_chdl.c
	ch dlcomp libhello.dl hello2_chdl.c

hello3.o : hello3.c
	ch dlcomp libhello.dl hello3.c

hello3_chdl.o : hello3_chdl.c
	ch dlcomp libhello.dl hello3_chdl.c

testarray.o : testarray.c
	ch dlcomp libhello.dl testarray.c

testarray_chdl.o : testarray_chdl.c
	ch dlcomp libhello.dl testarray_chdl.c

sum1.o : sum1.c
	ch dlcomp libhello.dl sum1.c

sum1_chdl.o : sum1_chdl.c
	ch dlcomp libhello.dl sum1_chdl.c

sum2.o : sum2.c
	ch dlcomp libhello.dl sum2.c

sum2_chdl.o : sum2_chdl.c
	ch dlcomp libhello.dl sum2_chdl.c

retstruct.o : retstruct.c
	ch dlcomp libhello.dl retstruct.c

retstruct_chdl.o : retstruct_chdl.c
	ch dlcomp libhello.dl retstruct_chdl.c

comp_array.o : comp_array.c
	ch dlcomp libhello.dl comp_array.c

ret_comp_arr_chdl.o : ret_comp_arr_chdl.c
	ch dlcomp libhello.dl ret_comp_arr_chdl.c

clean :
	rm -f *.dl *.o
