blob: da0fca227a78dc7b449035d08b968edea77742c4 [file] [log] [blame] [raw]
ifndef WCE
WCE = 4
endif
CC = arm-mingw32ce-gcc
AR = arm-mingw32ce-ar
WRC = arm-mingw32ce-windres
CFLAGS += -Wall -D_WCE=$(WCE) -Iinclude-private -Iinclude -O1
OBJECTS = \
assert.o \
environ.o \
errno.o \
getcwd.o \
locale.o \
mman.o \
sleep.o \
system.o \
posix-io/close.o \
posix-io/creat.o \
posix-io/dirent.o \
posix-io/dup.o \
posix-io/isatty.o \
posix-io/open.o \
posix-io/read.o \
posix-io/stat.o \
posix-io/write.o \
process/getpid.o \
process/signal.o \
stdio/perror.o \
stdio/remove.o \
stdio/rename.o \
stdio/rewind.o \
stdio/setbuffer.o \
string/bcopy.o \
string/index.o \
string/strcoll.o \
string/strerror.o \
string/strnlen.o \
time/gettime.o \
time/gettimeofday.o \
time/settimeofday.o \
time/time.o \
time/utime.o
ifeq ($(WCE),1)
OBJECTS += \
string/mbstowcs.o \
string/wcstombs.o
endif
first: libc.a c.dll
libc.a: $(OBJECTS)
$(AR) r libc.a $(OBJECTS)
c.dll: $(OBJECTS) celibc.rc.o
$(CC) --shared $(OBJECTS) celibc.rc.o -o c.dll -lmmtimer
celibc.rc.o: celibc.rc
arm-mingw32ce-windres celibc.rc -o $@
clean:
rm -f *.dll *.a $(OBJECTS) *.o
cedll.dll: cedll.o cedll.rc.o libc.a
$(CC) --shared cedll.o cedll.rc.o -o $@ -L. -lc
cedll.rc.o: cedll.rc
$(WRC) cedll.rc -o $@
# 不是目标:
celibc.rc: ;
cedll.rc: ;