#
# /emx/src/lib/app/makefile
#
LIBBASE=c_app
.INCLUDE: /emx/src/lib/libc0.mak

local: ;

crt2.o: crt2.s $(ASM386H)
emxio.o: emxio.s
getenv.o: getenv.c $(I)stdlib.h $(I)string.h
inp8.o: inp8.s $(ASM386H)
inp16.o: inp16.s $(ASM386H)
inp32.o: inp32.s $(ASM386H)
inps8.o: inps8.s $(ASM386H)
inps16.o: inps16.s $(ASM386H)
inps32.o: inps32.s $(ASM386H)
outp8.o: outp8.s $(ASM386H)
outp16.o: outp16.s $(ASM386H)
outp32.o: outp32.s $(ASM386H)
outps8.o: outps8.s $(ASM386H)
outps8da.o: outps8da.s $(ASM386H)
outps16.o: outps16.s $(ASM386H)
outps32.o: outps32.s $(ASM386H)
outpt.o: outpt.s $(ASM386H)
putenv.o: putenv.c $(I)stdlib.h $(I)string.h $(ERRNO) $(I)emx/time.h \
		$(I)emx/startup.h
wait0.o: wait0.s $(ASM386H)
wait01.o: wait01.s $(ASM386H)
wait1.o: wait1.s $(ASM386H)
wait10.o: wait10.s $(ASM386H)

iodata.o: ../iodata.c $(FCNTL) $(I)emx/io.h
	$(GCC) -c -D_NFILES=40 ../iodata.c

stdio.o: ../stdio.c $(I)stdio.h $(FCNTL) $(BUILTIN) $(S)fmutex.h \
		$(S)rmutex.h $(I)emx/io.h $(I)emx/startup.h
	$(GCC) -c -D_NFILES=40 ../stdio.c

$(DSTLIB): crt2.o crt3.o \
    emxio.o getenv.o inp8.o inp16.o inp32.o inps8.o inps16.o inps32.o \
    iodata.o outp8.o outp16.o outp32.o outps8.o outps8da.o outps16.o \
    outps32.o outpt.o putenv.o stdio.o wait0.o wait01.o wait1.o wait10.o
	$(AR) r $(DSTLIB) *.o
