#
# /emx/src/lib/dllrt/makefile
#
LIBBASE=c_dllrt
.INCLUDE: /emx/src/lib/libc0.mak
APP=../../app/

local: ;

crt3.o: crt3.s
dllinit.o: dllinit.c

crt2.o: $(APP)$(CPU)/crt2.s
	$(GCC) -c -x assembler-with-cpp -I. $(APP)$(CPU)/crt2.s

getenv.o: $(APP)getenv.c $(I)stdlib.h $(I)string.h
	$(GCC) -c $(APP)getenv.c

putenv.o: $(APP)putenv.c $(I)stdlib.h $(I)string.h
	$(GCC) -c $(APP)putenv.c

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

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

$(DSTLIB): crt2.o crt3.o dllinit.o getenv.o iodata.o putenv.o stdio.o
	$(AR) r $(DSTLIB) *.o
