blob: 32a33ecaedca88ff1ecd8cec72d8022d67a6fa1f [file] [log] [blame] [raw]
ifndef WCE
WCE = 4
endif
# Due to the coredll of Windows CE 1.x are missing very important C standard support,
# the Windows CE 1.x system does not yet supported.
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 \
localeconv.o \
mktemp.o \
mman.o \
sleep.o \
statfs.o \
system.o \
posix-io/access.o \
posix-io/chmod.o \
posix-io/close.o \
posix-io/creat.o \
posix-io/dirent.o \
posix-io/dup.o \
posix-io/fsync.o \
posix-io/isatty.o \
posix-io/lseek.o \
posix-io/open.o \
posix-io/read.o \
posix-io/stat.o \
posix-io/truncate.o \
posix-io/write.o \
process/getpid.o \
process/signal.o \
string/bcopy.o \
string/index.o \
string/strcoll.o \
string/strerror.o \
string/strnlen.o \
time/gettime.o \
time/gettimeofday.o \
time/settime.o \
time/settimeofday.o \
time/time.o \
time/utimens.o \
time/utimes.o
ifeq ($(WCE),1)
OBJECTS += \
string/mbstowcs.o \
string/wcstombs.o
else
OBJECTS += \
stdio/perror.o \
stdio/remove.o \
stdio/rename.o \
stdio/rewind.o \
stdio/setbuffer.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: ;