blob: dac2df61558ff0abd505d037b9c0dc235d06c7ab [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 \
mman.o \
sleep.o \
system.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/open.o \
posix-io/read.o \
posix-io/stat.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/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: ;