| AR = i586-mingw32msvc-ar |
| CC = i586-mingw32msvc-gcc |
| LD = i586-mingw32msvc-ld |
| CFLAGS += -Iinclude -I../ntdll/include -O1 -Wall |
| LDFLAGS += --shared -e _DllMainCRTStartup --enable-stdcall-fixup --subsystem 1 |
| MOD = \ |
| assert.o \ |
| calloc.o \ |
| char-io.o \ |
| ctype.o \ |
| environ.o \ |
| errno.o \ |
| getcwd.o \ |
| getopt.o \ |
| getpagesize.o \ |
| link.o \ |
| malloc.o \ |
| mkdir.o \ |
| qsort.o \ |
| readlink.o \ |
| rmdir.o \ |
| sleep.o \ |
| statfs.o \ |
| symlink.o \ |
| unlink.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/tty-fd.o \ |
| posix-io/write.o \ |
| process/abort.o \ |
| process/create-process.o \ |
| process/exit.o \ |
| process/fork.o \ |
| process/getpid.o \ |
| process/wait.o \ |
| stdio/perror.o \ |
| stdio/remove.o \ |
| stdio/rename.o \ |
| string/mbrtowc.o \ |
| string/strcasecmp.o \ |
| string/strdup.o \ |
| string/strerror.o \ |
| string/strncasecmp.o \ |
| string/strnlen.o \ |
| string/strtok.o \ |
| string/strtol.o \ |
| string/strtoll.o \ |
| string/wcrtomb.o \ |
| time/gettime.o \ |
| time/gettimeofday.o \ |
| time/gmtime.o \ |
| time/localtime.o \ |
| time/mktime.o \ |
| time/settime.o \ |
| time/settimeofday.o \ |
| time/strftime.o \ |
| time/time.o \ |
| time/tzset.o \ |
| time/utimens.o \ |
| time/utimes.o |
| |
| first: c.dll |
| |
| c.dll: dllcrt.o $(MOD) |
| $(LD) $(LDFLAGS) $^ -o $@ -L. -lntdll -lgcc |
| |
| libc.a: $(MOD) |
| $(AR) -r $@ $^ |
| |
| dllcrt.o: build-version.h |
| |
| build-version.h: |
| @{ [ -d ../.git ] && { export LANG=C; version=`git log --no-color --first-parent -n1 --pretty=format:%h`; echo "#define PKGVERSION \"$$version\""; } || echo "#define PKGVERSION \"Separate Build\""; } > $@ |
| @echo "#define BUILD_DATE \"`date -u +%F\ %T` UTC\"" >> $@ |
| |
| clean: |
| rm -f build-version.h dllcrt.o $(MOD) libc.a c.dll |