#################################################
#						#
# Makefile for CLIB\Exec directory		#
#						#
# Routines contained in this directory are:	#
#	cenvarg.c				#
#	doexec.asm				#
#	dospawn.asm				#
#	execload.asm				#
#	execl.c 				#
#	execle.c				#
#	execlp.c				#
#	execlpe.c				#
#	execv.c 				#
#	execve.c				#
#	execvp.c				#
#	execvpe.c				#
#	execmsg.asm				#
#	spawnl.c				#
#	spawnle.c				#
#	spawnlp.c				#
#	spawnlpe.c				#
#	spawnv.c				#
#	spawnve.c				#
#	spawnvp.c				#
#	spawnvpe.c				#
#	system.c				#
#	wait.asm				#
#						#
#################################################


#########################################
#					#
# Object lists				#
#					#
#########################################

# Common objects
COMM_O= \
	$(LIBC)\execl.obj \
	$(LIBC)\execle.obj \
	$(LIBC)\execlp.obj \
	$(LIBC)\execlpe.obj \
	$(LIBC)\execv.obj \
	$(LIBC)\execvp.obj \
	$(LIBC)\execvpe.obj \
	$(LIBC)\spawnl.obj \
	$(LIBC)\spawnle.obj \
	$(LIBC)\spawnlp.obj \
	$(LIBC)\spawnlpe.obj \
	$(LIBC)\spawnv.obj \
	$(LIBC)\spawnvp.obj


# DOS objects
DOS_O=	\
	$(LIBC)\dos\cenvarg.obj \
	$(LIBC)\dos\doexec.obj \
	$(LIBC)\dos\dospawn.obj \
	$(LIBC)\dos\execve.obj \
	$(LIBC)\dos\execload.obj \
	$(LIBC)\dos\execmsg.obj \
	$(LIBC)\dos\spawnve.obj \
	$(LIBC)\dos\spawnvpe.obj \
	$(LIBC)\dos\system.obj


# Windows objects
WIN_O=

WINDLL_O=


#########################################
#					#
# Target Dependency listings		#
#					#
#########################################

libc: $(COMM_O) $(DOS_O)



libcw: $(WIN_O)

libcwdll:  $(WINDLL_O)


#########################################################
#							#
#   Dependencies and rules for making local objects	#
#							#
#########################################################

$(LIBC)\execl.obj: execl.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execl.obj execl.c

$(LIBC)\execle.obj: execle.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stddef.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execle.obj execle.c

$(LIBC)\execlp.obj: execlp.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stddef.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execlp.obj execlp.c

$(LIBC)\execlpe.obj: execlpe.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execlpe.obj execlpe.c

$(LIBC)\execv.obj: execv.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execv.obj execv.c

$(LIBC)\execvp.obj: execvp.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execvp.obj execvp.c

$(LIBC)\execvpe.obj: execvpe.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\errno.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\string.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\execvpe.obj execvpe.c

$(LIBC)\spawnl.obj: spawnl.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\spawnl.obj spawnl.c

$(LIBC)\spawnle.obj: spawnle.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stddef.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\spawnle.obj spawnle.c

$(LIBC)\spawnlp.obj: spawnlp.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stddef.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\spawnlp.obj spawnlp.c

$(LIBC)\spawnlpe.obj: spawnlpe.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stddef.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\spawnlpe.obj spawnlpe.c

$(LIBC)\spawnv.obj: spawnv.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\spawnv.obj spawnv.c

$(LIBC)\spawnvp.obj: spawnvp.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\spawnvp.obj spawnvp.c


$(LIBC)\dos\cenvarg.obj: dos\cenvarg.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\errno.h \
		$(INCLUDE)\msdos.h \
		$(INCLUDE)\string.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\malloc.h \
		$(INCLUDE)\internal.h
	$(CC) $(MEM) -Fo$(LIBC)\dos\cenvarg.obj dos\cenvarg.c

$(LIBC)\dos\execload.obj: dos\execload.asm $(ASMSTD) \
		$(ASMINC)\defsegs.inc $(ASMINC)\errno.inc
	$(MM) -Fo$(LIBC)\dos\execload.obj dos\execload.asm

$(LIBC)\dos\doexec.obj: dos\doexec.asm $(ASMSTD) $(ASMINC)\msdos.inc \
		$(ASMINC)\defsegs.inc $(ASMINC)\rterr.inc
	$(MM) -Fo$(LIBC)\dos\doexec.obj dos\doexec.asm

$(LIBC)\dos\dospawn.obj: dos\dospawn.asm $(ASMSTD) $(ASMINC)\msdos.inc \
		$(ASMINC)\defsegs.inc $(ASMINC)\errno.inc
	$(MM) -Fo$(LIBC)\dos\dospawn.obj dos\dospawn.asm

$(LIBC)\dos\execve.obj: dos\execve.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\fcntl.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\errno.h \
		$(INCLUDE)\msdos.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\string.h \
		$(INCLUDE)\io.h \
		$(INCLUDE)\share.h \
		$(INCLUDE)\process.h \
		$(INCLUDE)\internal.h
	$(CC) $(MEM) -Fo$(LIBC)\dos\execve.obj dos\execve.c

$(LIBC)\dos\execmsg.obj: dos\execmsg.asm $(ASMSTD) \
		$(ASMINC)\defsegs.inc $(ASMINC)\rterr.inc
	$(MM) -Fo$(LIBC)\dos\execmsg.obj dos\execmsg.asm

$(LIBC)\dos\spawnve.obj: dos\spawnve.c \
		$(INCLUDE)\register.h \
		$(INCLUDE)\process.h \
		$(INCLUDE)\errno.h \
		$(INCLUDE)\io.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\string.h \
		$(INCLUDE)\internal.h \
		$(INCLUDE)\malloc.h
	$(CC) $(MEM) -Fo$(LIBC)\dos\spawnve.obj dos\spawnve.c

$(LIBC)\dos\spawnvpe.obj: spawnvpe.c \
		$(INCLUDE)\errno.h \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\register.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\string.h \
		$(INCLUDE)\malloc.h \
		$(INCLUDE)\internal.h \
		$(INCLUDE)\process.h
	$(CC) $(MEM) -Fo$(LIBC)\dos\spawnvpe.obj spawnvpe.c

$(LIBC)\dos\system.obj: system.c \
		$(INCLUDE)\assert.h \
		$(INCLUDE)\process.h \
		$(INCLUDE)\io.h \
		$(INCLUDE)\stdlib.h \
		$(INCLUDE)\errno.h
	$(CC) $(MEM) -Fo$(LIBC)\dos\system.obj system.c

