2013-03-19 18:28:32 -04:00
|
|
|
SOFTWARE_MEANT_FOR_SORTIX=1
|
2012-09-10 17:36:15 -04:00
|
|
|
include ../compiler.mak
|
|
|
|
include ../version.mak
|
|
|
|
include ../dirs.mak
|
|
|
|
|
|
|
|
ifndef OPTLEVEL
|
2013-03-19 18:28:32 -04:00
|
|
|
OPTLEVEL:=-g -O2 -fno-omit-frame-pointer
|
2011-08-05 08:25:00 -04:00
|
|
|
endif
|
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
CPUDIR:=$(CPU)
|
|
|
|
|
2013-12-26 19:44:03 -05:00
|
|
|
CPPINCLUDES=-Iinclude
|
2014-01-18 10:21:46 -05:00
|
|
|
CPPFLAGS=-D__is_sortix_libc $(CPPINCLUDES)
|
2013-03-19 18:28:32 -04:00
|
|
|
FLAGS=-Wall -Wextra $(OPTLEVEL)
|
|
|
|
CFLAGS=-std=gnu99
|
|
|
|
CXXFLAGS=-std=gnu++11 -fno-exceptions -fno-rtti
|
|
|
|
ASFLAGS=
|
2012-02-11 20:03:34 -05:00
|
|
|
|
2012-09-21 17:57:47 -04:00
|
|
|
FREEOBJS=\
|
2013-10-26 16:46:46 -04:00
|
|
|
assert/__assert.o \
|
2013-06-25 06:35:18 -04:00
|
|
|
aux/c++.o \
|
|
|
|
aux/op-new.o \
|
2014-01-07 15:36:01 -05:00
|
|
|
ctype/isalnum.o \
|
|
|
|
ctype/isalpha.o \
|
|
|
|
ctype/isblank.o \
|
|
|
|
ctype/iscntrl.o \
|
|
|
|
ctype/isdigit.o \
|
|
|
|
ctype/isgraph.o \
|
|
|
|
ctype/islower.o \
|
|
|
|
ctype/isprint.o \
|
|
|
|
ctype/ispunct.o \
|
|
|
|
ctype/isspace.o \
|
|
|
|
ctype/isupper.o \
|
|
|
|
ctype/isxdigit.o \
|
|
|
|
ctype/tolower.o \
|
|
|
|
ctype/toupper.o \
|
2013-06-21 18:30:45 -04:00
|
|
|
dirent/alphasort.o \
|
2014-01-03 13:20:51 -05:00
|
|
|
dirent/closedir.o \
|
|
|
|
dirent/dclearerr.o \
|
|
|
|
dirent/dcloseall.o \
|
|
|
|
dirent/deof.o \
|
|
|
|
dirent/derror.o \
|
|
|
|
dirent/dirfd.o \
|
|
|
|
dirent/dnewdir.o \
|
|
|
|
dirent/dregister.o \
|
|
|
|
dirent/dunregister.o \
|
|
|
|
dirent/readdir.o \
|
|
|
|
dirent/rewinddir.o \
|
2013-06-24 13:20:46 -04:00
|
|
|
dirent/versionsort.o \
|
2013-06-25 07:03:58 -04:00
|
|
|
errno/errno.o \
|
2013-12-12 18:43:10 -05:00
|
|
|
fnmatch/fnmatch.o \
|
2013-07-19 17:27:11 -04:00
|
|
|
inttypes/imaxabs.o \
|
2013-07-19 17:07:09 -04:00
|
|
|
inttypes/imaxdiv.o \
|
2013-07-18 18:24:37 -04:00
|
|
|
inttypes/strtoimax.o \
|
|
|
|
inttypes/strtoumax.o \
|
2013-07-19 16:36:11 -04:00
|
|
|
inttypes/wcstoimax.o \
|
|
|
|
inttypes/wcstoumax.o \
|
2013-06-24 18:37:42 -04:00
|
|
|
signal/sigaddset.o \
|
2013-07-27 10:28:58 -04:00
|
|
|
signal/sigandset.o \
|
2013-06-24 18:37:42 -04:00
|
|
|
signal/sigdelset.o \
|
|
|
|
signal/sigemptyset.o \
|
|
|
|
signal/sigfillset.o \
|
2013-07-27 10:28:58 -04:00
|
|
|
signal/sigisemptyset.o \
|
2013-06-24 18:37:42 -04:00
|
|
|
signal/sigismember.o \
|
2013-07-27 10:28:58 -04:00
|
|
|
signal/signotset.o \
|
|
|
|
signal/sigorset.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/clearerr.o \
|
2013-07-20 08:10:06 -04:00
|
|
|
stdio/dprintf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/fbufsize.o \
|
|
|
|
stdio/fclose.o \
|
|
|
|
stdio/fdeletefile.o \
|
|
|
|
stdio/feof.o \
|
|
|
|
stdio/ferror.o \
|
|
|
|
stdio/fflush.o \
|
|
|
|
stdio/fflush_stop_reading.o \
|
|
|
|
stdio/fflush_stop_writing.o \
|
|
|
|
stdio/fgetc.o \
|
|
|
|
stdio/fgets.o \
|
|
|
|
stdio/flbf.o \
|
2013-07-20 07:21:14 -04:00
|
|
|
stdio/flockfile.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/flushlbf.o \
|
|
|
|
stdio/fnewfile.o \
|
|
|
|
stdio/fpending.o \
|
|
|
|
stdio/fpurge.o \
|
|
|
|
stdio/fputc.o \
|
|
|
|
stdio/fputs.o \
|
|
|
|
stdio/freadable.o \
|
|
|
|
stdio/freading.o \
|
|
|
|
stdio/fread.o \
|
|
|
|
stdio/fregister.o \
|
|
|
|
stdio/fresetfile.o \
|
|
|
|
stdio/fscanf.o \
|
|
|
|
stdio/fseek.o \
|
|
|
|
stdio/fseeko.o \
|
|
|
|
stdio/fsetdefaultbuf.o \
|
|
|
|
stdio/fseterr.o \
|
|
|
|
stdio/fsetlocking.o \
|
|
|
|
stdio/fshutdown.o \
|
|
|
|
stdio/ftell.o \
|
|
|
|
stdio/ftello.o \
|
2013-07-20 07:21:14 -04:00
|
|
|
stdio/ftrylockfile.o \
|
|
|
|
stdio/funlockfile.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/fwritable.o \
|
|
|
|
stdio/fwrite.o \
|
|
|
|
stdio/fwriting.o \
|
|
|
|
stdio/getdelim.o \
|
|
|
|
stdio/getline.o \
|
|
|
|
stdio/rewind.o \
|
|
|
|
stdio/setbuf.o \
|
|
|
|
stdio/setvbuf.o \
|
2013-07-20 07:47:42 -04:00
|
|
|
stdio/snprintf.o \
|
|
|
|
stdio/sprintf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/sscanf.o \
|
|
|
|
stdio/ungetc.o \
|
2013-07-20 08:10:06 -04:00
|
|
|
stdio/vdprintf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/vfscanf.o \
|
2013-10-20 20:00:59 -04:00
|
|
|
stdio/vprintf_callback.o \
|
2013-07-20 07:47:42 -04:00
|
|
|
stdio/vsnprintf.o \
|
|
|
|
stdio/vsprintf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/vsscanf.o \
|
2013-06-24 17:52:59 -04:00
|
|
|
stdlib/abort.o \
|
|
|
|
stdlib/abs.o \
|
|
|
|
stdlib/atof.o \
|
|
|
|
stdlib/atoi.o \
|
|
|
|
stdlib/atoll.o \
|
|
|
|
stdlib/atol.o \
|
|
|
|
stdlib/bsearch.o \
|
|
|
|
stdlib/calloc.o \
|
|
|
|
stdlib/div.o \
|
|
|
|
stdlib/heap.o \
|
2013-07-19 17:27:11 -04:00
|
|
|
stdlib/labs.o \
|
2013-06-24 17:52:59 -04:00
|
|
|
stdlib/ldiv.o \
|
2013-07-19 17:27:11 -04:00
|
|
|
stdlib/llabs.o \
|
2013-06-24 17:52:59 -04:00
|
|
|
stdlib/lldiv.o \
|
|
|
|
stdlib/mblen.o \
|
|
|
|
stdlib/mbstowcs.o \
|
|
|
|
stdlib/mbtowc.o \
|
|
|
|
stdlib/qsort.o \
|
|
|
|
stdlib/strtod.o \
|
|
|
|
stdlib/strtof.o \
|
|
|
|
stdlib/strtold.o \
|
2013-07-18 18:24:37 -04:00
|
|
|
stdlib/strtoll.o \
|
|
|
|
stdlib/strtol.o \
|
|
|
|
stdlib/strtoull.o \
|
|
|
|
stdlib/strtoul.o \
|
2013-06-24 17:52:59 -04:00
|
|
|
stdlib/wcstombs.o \
|
|
|
|
stdlib/wctomb.o \
|
2013-07-12 08:23:26 -04:00
|
|
|
string/ffsll.o \
|
|
|
|
string/ffsl.o \
|
|
|
|
string/ffs.o \
|
2013-06-12 07:35:22 -04:00
|
|
|
string/memccpy.o \
|
|
|
|
string/memchr.o \
|
|
|
|
string/memcmp.o \
|
|
|
|
string/memcpy.o \
|
|
|
|
string/memmove.o \
|
|
|
|
string/memset.o \
|
|
|
|
string/stpcpy.o \
|
|
|
|
string/stpncpy.o \
|
|
|
|
string/strcasecmp.o \
|
|
|
|
string/strcat.o \
|
|
|
|
string/strchrnul.o \
|
|
|
|
string/strchr.o \
|
|
|
|
string/strcmp.o \
|
2013-07-11 14:25:46 -04:00
|
|
|
string/strcoll_l.o \
|
2013-06-12 07:35:22 -04:00
|
|
|
string/strcoll.o \
|
|
|
|
string/strcpy.o \
|
|
|
|
string/strcspn.o \
|
|
|
|
string/strdup.o \
|
2013-07-11 16:33:54 -04:00
|
|
|
string/strerror_l.o \
|
2013-06-12 07:35:22 -04:00
|
|
|
string/strerror.o \
|
2013-07-11 16:33:54 -04:00
|
|
|
string/strerror_r.o \
|
2013-07-11 17:13:19 -04:00
|
|
|
string/strlcat.o \
|
2013-07-11 16:22:21 -04:00
|
|
|
string/strlcpy.o \
|
2013-06-12 07:35:22 -04:00
|
|
|
string/strlen.o \
|
|
|
|
string/strncasecmp.o \
|
|
|
|
string/strncat.o \
|
|
|
|
string/strncmp.o \
|
|
|
|
string/strncpy.o \
|
|
|
|
string/strndup.o \
|
|
|
|
string/strnlen.o \
|
|
|
|
string/strpbrk.o \
|
|
|
|
string/strrchr.o \
|
|
|
|
string/strsignal.o \
|
|
|
|
string/strspn.o \
|
|
|
|
string/strstr.o \
|
|
|
|
string/strtok.o \
|
|
|
|
string/strtok_r.o \
|
2013-06-24 13:11:46 -04:00
|
|
|
string/strverscmp.o \
|
2013-07-11 14:29:11 -04:00
|
|
|
string/strxfrm_l.o \
|
2013-06-12 07:35:22 -04:00
|
|
|
string/strxfrm.o \
|
2013-03-21 20:09:03 -04:00
|
|
|
time/asctime.o \
|
|
|
|
time/asctime_r.o \
|
2013-05-15 13:09:37 -04:00
|
|
|
time/gmtime.o \
|
|
|
|
time/gmtime_r.o \
|
2013-03-22 21:41:28 -04:00
|
|
|
time/mktime.o \
|
2013-06-25 09:27:48 -04:00
|
|
|
timespec/timespec.o \
|
2013-07-19 19:41:18 -04:00
|
|
|
time/strftime_l.o \
|
2013-03-21 19:13:30 -04:00
|
|
|
time/strftime.o \
|
2013-03-22 21:41:28 -04:00
|
|
|
time/timegm.o \
|
2013-06-12 09:11:15 -04:00
|
|
|
wchar/mbrlen.o \
|
|
|
|
wchar/mbrtowc.o \
|
|
|
|
wchar/mbsrtowcs.o \
|
|
|
|
wchar/wcrtomb.o \
|
|
|
|
wchar/wcscat.o \
|
|
|
|
wchar/wcschrnul.o \
|
|
|
|
wchar/wcschr.o \
|
|
|
|
wchar/wcscmp.o \
|
2013-07-19 16:49:25 -04:00
|
|
|
wchar/wcscoll.o \
|
2013-06-12 09:11:15 -04:00
|
|
|
wchar/wcscpy.o \
|
|
|
|
wchar/wcscspn.o \
|
|
|
|
wchar/wcslen.o \
|
|
|
|
wchar/wcsncat.o \
|
2013-09-15 18:06:27 -04:00
|
|
|
wchar/wcsncmp.o \
|
2013-06-12 09:11:15 -04:00
|
|
|
wchar/wcsncpy.o \
|
2013-09-15 18:20:30 -04:00
|
|
|
wchar/wcspbrk.o \
|
2013-06-12 09:11:15 -04:00
|
|
|
wchar/wcsrchr.o \
|
|
|
|
wchar/wcsrtombs.o \
|
|
|
|
wchar/wcsspn.o \
|
2013-09-16 08:41:16 -04:00
|
|
|
wchar/wcsstr.o \
|
2013-06-12 09:11:15 -04:00
|
|
|
wchar/wcstok.o \
|
2013-07-19 16:36:11 -04:00
|
|
|
wchar/wcstoll.o \
|
|
|
|
wchar/wcstol.o \
|
|
|
|
wchar/wcstoull.o \
|
|
|
|
wchar/wcstoul.o \
|
2013-09-15 18:14:06 -04:00
|
|
|
wchar/wcsxfrm.o \
|
2013-09-16 09:05:52 -04:00
|
|
|
wchar/wmemchr.o \
|
2013-09-15 18:01:19 -04:00
|
|
|
wchar/wmemcmp.o \
|
2013-09-16 09:12:30 -04:00
|
|
|
wchar/wmemcpy.o \
|
2013-09-16 09:37:27 -04:00
|
|
|
wchar/wmemmove.o \
|
2013-09-16 09:46:08 -04:00
|
|
|
wchar/wmemset.o \
|
2013-06-24 18:02:01 -04:00
|
|
|
wctype/wctype.o \
|
2012-09-21 17:57:47 -04:00
|
|
|
|
|
|
|
HOSTEDOBJS=\
|
2013-03-19 17:40:37 -04:00
|
|
|
arpa/inet/inet_addr.o \
|
|
|
|
arpa/inet/inet_ntoa.o \
|
|
|
|
arpa/inet/inet_ntop.o \
|
|
|
|
arpa/inet/inet_pton.o \
|
2013-06-25 06:50:37 -04:00
|
|
|
calltrace/calltrace.o \
|
2013-01-06 10:49:36 -05:00
|
|
|
$(CPUDIR)/calltrace.o \
|
2012-09-21 17:57:47 -04:00
|
|
|
$(CPUDIR)/fork.o \
|
2013-03-31 09:00:12 -04:00
|
|
|
$(CPUDIR)/setjmp.o \
|
2012-09-21 17:57:47 -04:00
|
|
|
$(CPUDIR)/signal.o \
|
2013-01-12 13:48:27 -05:00
|
|
|
$(CPUDIR)/syscall.o \
|
2014-01-03 13:33:12 -05:00
|
|
|
dirent/fdopendir.o \
|
|
|
|
dirent/opendir.o \
|
2013-06-21 18:12:10 -04:00
|
|
|
dirent/scandir.o \
|
2013-06-25 07:33:21 -04:00
|
|
|
dlfcn/dlfcn.o \
|
2013-07-19 10:04:32 -04:00
|
|
|
error/gnu_error.o \
|
2013-06-24 18:17:49 -04:00
|
|
|
fcntl/creat.o \
|
|
|
|
fcntl/fcntl.o \
|
|
|
|
fcntl/openat.o \
|
|
|
|
fcntl/open.o \
|
2013-06-24 17:24:18 -04:00
|
|
|
fsmarshall/fsm_bootstraprootfd.o \
|
|
|
|
fsmarshall/fsm_closechannel.o \
|
|
|
|
fsmarshall/fsm_closeserver.o \
|
|
|
|
fsmarshall/fsm_fsbind.o \
|
|
|
|
fsmarshall/fsm_listen.o \
|
|
|
|
fsmarshall/fsm_mkserver.o \
|
|
|
|
fsmarshall/fsm_recv.o \
|
|
|
|
fsmarshall/fsm_send.o \
|
2013-07-26 11:22:57 -04:00
|
|
|
getopt/getopt_long.o \
|
|
|
|
getopt/getopt.o \
|
2013-10-01 16:23:50 -04:00
|
|
|
grp/endgrent.o \
|
|
|
|
grp/fgetgrent.o \
|
|
|
|
grp/fgetgrent_r.o \
|
|
|
|
grp/getgrent.o \
|
|
|
|
grp/getgrent_r.o \
|
|
|
|
grp/getgrgid.o \
|
|
|
|
grp/getgrgid_r.o \
|
|
|
|
grp/getgrnam.o \
|
|
|
|
grp/getgrnam_r.o \
|
|
|
|
grp/opengr.o \
|
|
|
|
grp/setgrent.o \
|
2013-06-25 08:06:10 -04:00
|
|
|
init/init.o \
|
2013-09-25 17:40:27 -04:00
|
|
|
ioleast/preadall.o \
|
|
|
|
ioleast/preadleast.o \
|
|
|
|
ioleast/pwriteall.o \
|
|
|
|
ioleast/pwriteleast.o \
|
|
|
|
ioleast/readall.o \
|
|
|
|
ioleast/readleast.o \
|
|
|
|
ioleast/writeall.o \
|
|
|
|
ioleast/writeleast.o \
|
2013-06-24 17:07:11 -04:00
|
|
|
libgen/basename.o \
|
|
|
|
libgen/dirname.o \
|
2013-06-24 18:20:58 -04:00
|
|
|
locale/localeconv.o \
|
|
|
|
locale/setlocale.o \
|
2013-03-19 17:40:37 -04:00
|
|
|
netdb/endhostent.o \
|
|
|
|
netdb/endnetent.o \
|
|
|
|
netdb/endprotoent.o \
|
|
|
|
netdb/endservent.o \
|
|
|
|
netdb/freeaddrinfo.o \
|
|
|
|
netdb/gai_strerror.o \
|
|
|
|
netdb/getaddrinfo.o \
|
|
|
|
netdb/gethostent.o \
|
|
|
|
netdb/getnameinfo.o \
|
|
|
|
netdb/getnetbyaddr.o \
|
|
|
|
netdb/getnetbyname.o \
|
|
|
|
netdb/getnetent.o \
|
|
|
|
netdb/getprotobyname.o \
|
|
|
|
netdb/getprotobynumber.o \
|
|
|
|
netdb/getprotoent.o \
|
|
|
|
netdb/getservbyname.o \
|
|
|
|
netdb/getservbyport.o \
|
|
|
|
netdb/getservent.o \
|
|
|
|
netdb/sethostent.o \
|
|
|
|
netdb/setnetent.o \
|
|
|
|
netdb/setprotoent.o \
|
|
|
|
netdb/setservent.o \
|
2013-06-24 18:22:24 -04:00
|
|
|
poll/poll.o \
|
|
|
|
poll/ppoll.o \
|
2013-10-01 14:21:50 -04:00
|
|
|
pwd/endpwent.o \
|
|
|
|
pwd/fgetpwent.o \
|
|
|
|
pwd/fgetpwent_r.o \
|
|
|
|
pwd/getpwent.o \
|
|
|
|
pwd/getpwent_r.o \
|
|
|
|
pwd/getpwnam.o \
|
|
|
|
pwd/getpwnam_r.o \
|
|
|
|
pwd/getpwuid.o \
|
|
|
|
pwd/getpwuid_r.o \
|
|
|
|
pwd/openpw.o \
|
|
|
|
pwd/setpwent.o \
|
2013-06-24 18:37:42 -04:00
|
|
|
signal/kill.o \
|
2013-07-11 17:22:53 -04:00
|
|
|
signal/killpg.o \
|
2013-06-24 18:37:42 -04:00
|
|
|
signal/psignal.o \
|
|
|
|
signal/raise.o \
|
|
|
|
signal/sigaction.o \
|
|
|
|
signal/SIG_DFL.o \
|
|
|
|
signal/SIG_ERR.o \
|
|
|
|
signal/SIG_IGN.o \
|
|
|
|
signal/signal.o \
|
|
|
|
signal/sigprocmask.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/fcloseall.o \
|
|
|
|
stdio/fdio.o \
|
|
|
|
stdio/fgetpos.o \
|
|
|
|
stdio/fileno.o \
|
|
|
|
stdio/fpipe.o \
|
2013-07-20 07:35:19 -04:00
|
|
|
stdio/fprintf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/freopen.o \
|
|
|
|
stdio/fsetpos.o \
|
|
|
|
stdio/getc.o \
|
2013-07-19 10:04:32 -04:00
|
|
|
stdio/perror.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/popen.o \
|
2013-07-20 07:35:19 -04:00
|
|
|
stdio/printf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/putc.o \
|
|
|
|
stdio/removeat.o \
|
|
|
|
stdio/remove.o \
|
|
|
|
stdio/renameat.o \
|
|
|
|
stdio/rename.o \
|
|
|
|
stdio/scanf.o \
|
|
|
|
stdio/stdio.o \
|
|
|
|
stdio/tmpfile.o \
|
|
|
|
stdio/tmpnam.o \
|
2013-07-20 07:35:19 -04:00
|
|
|
stdio/vfprintf.o \
|
|
|
|
stdio/vprintf.o \
|
2013-06-25 07:58:12 -04:00
|
|
|
stdio/vscanf.o \
|
2013-10-21 14:11:34 -04:00
|
|
|
stdlib/atexit.o \
|
2013-06-24 17:52:59 -04:00
|
|
|
stdlib/canonicalize_file_name_at.o \
|
|
|
|
stdlib/canonicalize_file_name.o \
|
|
|
|
stdlib/env.o \
|
|
|
|
stdlib/_Exit.o \
|
|
|
|
stdlib/exit.o \
|
2013-09-18 14:07:30 -04:00
|
|
|
stdlib/mkstemp.o \
|
2013-06-24 17:52:59 -04:00
|
|
|
stdlib/mktemp.o \
|
|
|
|
stdlib/on_exit.o \
|
|
|
|
stdlib/rand.o \
|
|
|
|
stdlib/realpath.o \
|
|
|
|
stdlib/system.o \
|
2013-06-25 06:49:10 -04:00
|
|
|
sys/display/dispmsg_issue.o \
|
2013-06-25 07:41:05 -04:00
|
|
|
sys/ioctl/ioctl.o \
|
2013-06-25 07:37:11 -04:00
|
|
|
sys/kernelinfo/kernelinfo.o \
|
2013-08-19 15:03:07 -04:00
|
|
|
sys/mman/mmap.o \
|
|
|
|
sys/mman/mprotect.o \
|
|
|
|
sys/mman/munmap.o \
|
2013-06-25 07:43:02 -04:00
|
|
|
sys/readdirents/readdirents.o \
|
2013-08-30 11:35:30 -04:00
|
|
|
sys/resource/getpriority.o \
|
2013-08-30 18:12:03 -04:00
|
|
|
sys/resource/getrlimit.o \
|
2013-08-30 19:17:43 -04:00
|
|
|
sys/resource/getrusage.o \
|
2013-08-30 17:55:09 -04:00
|
|
|
sys/resource/prlimit.o \
|
2013-08-30 11:35:30 -04:00
|
|
|
sys/resource/setpriority.o \
|
2013-08-30 18:12:03 -04:00
|
|
|
sys/resource/setrlimit.o \
|
2013-06-25 07:01:37 -04:00
|
|
|
sys/select/select.o \
|
2013-03-19 17:40:37 -04:00
|
|
|
sys/socket/accept4.o \
|
|
|
|
sys/socket/accept.o \
|
|
|
|
sys/socket/bind.o \
|
|
|
|
sys/socket/connect.o \
|
|
|
|
sys/socket/getpeername.o \
|
|
|
|
sys/socket/getsockname.o \
|
|
|
|
sys/socket/getsockopt.o \
|
|
|
|
sys/socket/listen.o \
|
|
|
|
sys/socket/recvfrom.o \
|
|
|
|
sys/socket/recvmsg.o \
|
|
|
|
sys/socket/recv.o \
|
|
|
|
sys/socket/sendmsg.o \
|
|
|
|
sys/socket/send.o \
|
|
|
|
sys/socket/sendto.o \
|
|
|
|
sys/socket/setsockopt.o \
|
|
|
|
sys/socket/shutdown.o \
|
|
|
|
sys/socket/sockatmark.o \
|
|
|
|
sys/socket/socket.o \
|
|
|
|
sys/socket/socketpair.o \
|
2013-10-04 14:31:57 -04:00
|
|
|
sys/stat/chmod.o \
|
|
|
|
sys/stat/fchmodat.o \
|
|
|
|
sys/stat/fchmod.o \
|
|
|
|
sys/stat/fstatat.o \
|
|
|
|
sys/stat/fstat.o \
|
|
|
|
sys/stat/futimens.o \
|
|
|
|
sys/stat/lstat.o \
|
|
|
|
sys/stat/mkdirat.o \
|
|
|
|
sys/stat/mkdir.o \
|
|
|
|
sys/stat/stat.o \
|
|
|
|
sys/stat/umask.o \
|
|
|
|
sys/stat/utimensat.o \
|
|
|
|
sys/stat/utimens.o \
|
2013-06-25 06:45:17 -04:00
|
|
|
sys/termmode/gettermmode.o \
|
|
|
|
sys/termmode/settermmode.o \
|
2013-05-12 16:10:34 -04:00
|
|
|
sys/time/gettimeofday.o \
|
2013-06-24 19:38:11 -04:00
|
|
|
sys/uio/preadv.o \
|
|
|
|
sys/uio/pwritev.o \
|
|
|
|
sys/uio/readv.o \
|
|
|
|
sys/uio/writev.o \
|
2013-06-24 19:47:36 -04:00
|
|
|
sys/wait/wait.o \
|
|
|
|
sys/wait/waitpid.o \
|
2013-06-24 19:11:51 -04:00
|
|
|
termios/tcgetwinsize.o \
|
2013-05-12 16:10:34 -04:00
|
|
|
time/clock_getres.o \
|
|
|
|
time/clock_gettime.o \
|
|
|
|
time/clock_gettimeres.o \
|
2013-05-14 12:41:49 -04:00
|
|
|
time/clock_nanosleep.o \
|
2013-05-15 09:00:48 -04:00
|
|
|
time/clock.o \
|
2013-05-12 16:10:34 -04:00
|
|
|
time/clock_settime.o \
|
|
|
|
time/clock_settimeres.o \
|
2013-05-16 09:51:43 -04:00
|
|
|
time/ctime.o \
|
|
|
|
time/ctime_r.o \
|
2013-05-15 09:08:47 -04:00
|
|
|
time/difftime.o \
|
2013-05-16 09:51:43 -04:00
|
|
|
time/localtime.o \
|
|
|
|
time/localtime_r.o \
|
2013-05-14 12:41:49 -04:00
|
|
|
time/nanosleep.o \
|
2013-05-15 06:37:39 -04:00
|
|
|
time/timens.o \
|
2013-05-12 16:10:34 -04:00
|
|
|
time/time.o \
|
2013-10-13 17:56:58 -04:00
|
|
|
time/timer_create.o \
|
|
|
|
time/timer_delete.o \
|
|
|
|
time/timer_getoverrun.o \
|
|
|
|
time/timer_gettime.o \
|
|
|
|
time/timer_settime.o \
|
2013-05-15 08:41:42 -04:00
|
|
|
time/times.o \
|
2013-06-24 19:11:51 -04:00
|
|
|
unistd/access.o \
|
|
|
|
unistd/alarmns.o \
|
|
|
|
unistd/alarm.o \
|
|
|
|
unistd/chdir.o \
|
|
|
|
unistd/chown.o \
|
|
|
|
unistd/chroot.o \
|
|
|
|
unistd/close.o \
|
|
|
|
unistd/confstr.o \
|
|
|
|
unistd/dup2.o \
|
2013-09-23 14:41:31 -04:00
|
|
|
unistd/dup3.o \
|
2013-06-24 19:11:51 -04:00
|
|
|
unistd/dup.o \
|
|
|
|
unistd/execle.o \
|
|
|
|
unistd/execl.o \
|
|
|
|
unistd/execlp.o \
|
|
|
|
unistd/execve.o \
|
|
|
|
unistd/execv.o \
|
|
|
|
unistd/execvpe.o \
|
|
|
|
unistd/execvp.o \
|
|
|
|
unistd/_exit.o \
|
|
|
|
unistd/faccessat.o \
|
|
|
|
unistd/fchdirat.o \
|
|
|
|
unistd/fchdir.o \
|
|
|
|
unistd/fchownat.o \
|
|
|
|
unistd/fchown.o \
|
|
|
|
unistd/fchrootat.o \
|
|
|
|
unistd/fchroot.o \
|
|
|
|
unistd/fork.o \
|
|
|
|
unistd/fsync.o \
|
|
|
|
unistd/ftruncate.o \
|
|
|
|
unistd/getcwd.o \
|
|
|
|
unistd/getegid.o \
|
|
|
|
unistd/geteuid.o \
|
|
|
|
unistd/getgid.o \
|
|
|
|
unistd/gethostname.o \
|
|
|
|
unistd/getlogin.o \
|
|
|
|
unistd/getlogin_r.o \
|
|
|
|
unistd/getpagesize.o \
|
|
|
|
unistd/getpgid.o \
|
|
|
|
unistd/getpid.o \
|
|
|
|
unistd/getppid.o \
|
|
|
|
unistd/getuid.o \
|
|
|
|
unistd/isatty.o \
|
|
|
|
unistd/lchown.o \
|
|
|
|
unistd/linkat.o \
|
|
|
|
unistd/link.o \
|
|
|
|
unistd/lseek.o \
|
|
|
|
unistd/memstat.o \
|
|
|
|
unistd/mkpartition.o \
|
|
|
|
unistd/pathconf.o \
|
|
|
|
unistd/pipe.o \
|
2013-07-11 17:29:52 -04:00
|
|
|
unistd/pread.o \
|
|
|
|
unistd/pwrite.o \
|
2013-06-24 19:11:51 -04:00
|
|
|
unistd/readlinkat.o \
|
|
|
|
unistd/readlink.o \
|
|
|
|
unistd/read.o \
|
|
|
|
unistd/rmdir.o \
|
|
|
|
unistd/sbrk.o \
|
|
|
|
unistd/setegid.o \
|
|
|
|
unistd/seteuid.o \
|
|
|
|
unistd/setgid.o \
|
|
|
|
unistd/setpgid.o \
|
|
|
|
unistd/setuid.o \
|
|
|
|
unistd/sfork.o \
|
|
|
|
unistd/sleep.o \
|
2013-11-21 14:27:34 -05:00
|
|
|
unistd/symlinkat.o \
|
|
|
|
unistd/symlink.o \
|
2013-06-24 19:11:51 -04:00
|
|
|
unistd/sysconf.o \
|
|
|
|
unistd/tcgetpgrp.o \
|
|
|
|
unistd/tcsetpgrp.o \
|
|
|
|
unistd/tfork.o \
|
|
|
|
unistd/truncateat.o \
|
|
|
|
unistd/truncate.o \
|
|
|
|
unistd/ttyname.o \
|
|
|
|
unistd/unlinkat.o \
|
|
|
|
unistd/unlink.o \
|
|
|
|
unistd/usleep.o \
|
|
|
|
unistd/write.o \
|
2013-06-25 06:52:58 -04:00
|
|
|
utime/utime.o \
|
2012-09-21 17:57:47 -04:00
|
|
|
|
|
|
|
OBJS=\
|
|
|
|
$(FREEOBJS) \
|
|
|
|
$(HOSTEDOBJS) \
|
2012-02-11 20:03:34 -05:00
|
|
|
|
2012-09-08 08:37:16 -04:00
|
|
|
CRTOBJ=\
|
|
|
|
crt1.o \
|
|
|
|
crti.o \
|
|
|
|
crtn.o \
|
|
|
|
|
|
|
|
MISCOBJ=\
|
|
|
|
$(CRTOBJ) \
|
|
|
|
|
2013-12-26 19:44:03 -05:00
|
|
|
HEADERS:=$(shell find include -type d)
|
2012-02-11 20:03:34 -05:00
|
|
|
|
2012-09-21 17:57:47 -04:00
|
|
|
SORTIXOBJS:=$(addprefix sortix/,$(FREEOBJS))
|
2014-01-18 10:21:46 -05:00
|
|
|
SORTIXCPPFLAGS:=$(CPPFLAGS) -D__is_sortix_kernel
|
2013-03-19 18:28:32 -04:00
|
|
|
SORTIXFLAGS:=$(FLAGS) -ffreestanding
|
|
|
|
SORTIXCFLAGS:=$(CFLAGS)
|
|
|
|
SORTIXCXXFLAGS:=$(CXXFLAGS)
|
|
|
|
ifeq ($(HOST),x86_64-sortix)
|
|
|
|
SORTIXFLAGS:=$(SORTIXFLAGS) -mno-red-zone
|
|
|
|
endif
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2014-01-14 18:14:27 -05:00
|
|
|
BINS=libc.a libdl.a libg.a libpthread.a librt.a $(CRTOBJ)
|
2013-03-19 18:28:32 -04:00
|
|
|
BINSKERNEL=libc-sortix.a
|
|
|
|
INSTALLLIBS:=$(addprefix $(DESTDIR)$(LIBDIR)/,$(BINS))
|
|
|
|
INSTALLLIBSKERNEL:=$(addprefix $(DESTDIR)$(LIBDIR)/,$(BINSKERNEL))
|
2012-09-08 08:37:16 -04:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
all: libs libs-kernel
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
libs: $(BINS)
|
|
|
|
|
|
|
|
libs-kernel: $(BINSKERNEL)
|
|
|
|
|
|
|
|
.PHONY: all libs headers clean install install-include-dirs install-headers \
|
|
|
|
install-lib-dirs install-libs libs-kernel
|
|
|
|
|
|
|
|
FORCE:
|
2012-09-10 15:45:38 -04:00
|
|
|
|
2012-09-23 08:04:53 -04:00
|
|
|
libc.a: $(OBJS)
|
|
|
|
$(HOSTAR) rcs $@ $(OBJS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2012-09-23 08:04:53 -04:00
|
|
|
libc-sortix.a: $(SORTIXOBJS)
|
|
|
|
$(HOSTAR) rcs $@ $(SORTIXOBJS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2014-01-14 18:14:27 -05:00
|
|
|
libdl.a:
|
|
|
|
$(HOSTAR) rcs $@
|
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
libg.a:
|
|
|
|
$(HOSTAR) rcs $@
|
2012-01-08 09:45:13 -05:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
libpthread.a:
|
2012-09-10 17:36:15 -04:00
|
|
|
$(HOSTAR) rcs $@
|
2012-01-08 09:45:13 -05:00
|
|
|
|
2014-01-14 18:14:27 -05:00
|
|
|
librt.a:
|
|
|
|
$(HOSTAR) rcs $@
|
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
crt1.o: $(CPUDIR)/crt1.o
|
2012-09-08 08:37:16 -04:00
|
|
|
ln -f $< $@
|
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
crti.o: $(CPUDIR)/crti.o
|
2012-09-08 08:37:16 -04:00
|
|
|
ln -f $< $@
|
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
crtn.o: $(CPUDIR)/crtn.o
|
2012-09-08 08:37:16 -04:00
|
|
|
ln -f $< $@
|
2011-09-15 16:19:04 -04:00
|
|
|
|
2012-02-11 20:03:34 -05:00
|
|
|
# header preprocessing
|
2013-03-19 18:28:32 -04:00
|
|
|
$(OBJS) $(SORTIXOBJS): $(HEADERS)
|
|
|
|
|
2013-12-26 19:44:03 -05:00
|
|
|
headers:
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2012-02-11 20:03:34 -05:00
|
|
|
# standard library
|
2013-03-19 18:28:32 -04:00
|
|
|
%.o: %.c
|
|
|
|
$(HOSTCC) -c $< -o $@ $(CPPFLAGS) $(FLAGS) $(CFLAGS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
%.o: %.cpp
|
|
|
|
$(HOSTCXX) -c $< -o $@ $(CPPFLAGS) $(FLAGS) $(CXXFLAGS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2013-12-28 15:00:15 -05:00
|
|
|
%.o: %.S
|
|
|
|
$(HOSTCXX) -c $< -o $@ $(CPPFLAGS) $(FLAGS) $(CFLAGS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2012-09-23 08:04:53 -04:00
|
|
|
# libc-sortix
|
2013-03-19 18:28:32 -04:00
|
|
|
sortix/%.o: %.c
|
|
|
|
$(HOSTCC) -c $< -o $@ $(SORTIXCPPFLAGS) $(SORTIXFLAGS) $(SORTIXCFLAGS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
sortix/%.o: %.cpp
|
|
|
|
$(HOSTCXX) -c $< -o $@ $(SORTIXCPPFLAGS) $(SORTIXFLAGS) $(SORTIXCXXFLAGS)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
|
|
|
clean:
|
2013-03-19 18:28:32 -04:00
|
|
|
rm -f $(wildcard *.o) $(wildcard */*.o) $(wildcard */*/*.o) $(wildcard *.a)
|
2011-08-05 08:25:00 -04:00
|
|
|
|
2011-09-15 16:38:40 -04:00
|
|
|
# Installation into sysroot
|
2013-03-19 18:28:32 -04:00
|
|
|
install: install-headers install-libs install-libs-kernel
|
|
|
|
|
2013-12-26 19:44:03 -05:00
|
|
|
$(DESTDIR)$(LIBDIR):
|
2013-03-19 18:28:32 -04:00
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
$(DESTDIR)$(LIBDIR)/%: %
|
|
|
|
cp -P $< $@
|
|
|
|
|
|
|
|
$(INSTALLLIBS): | $(DESTDIR)$(LIBDIR)
|
|
|
|
|
|
|
|
$(INSTALLLIBSKERNEL): | $(DESTDIR)$(LIBDIR)
|
|
|
|
|
2013-12-26 19:44:03 -05:00
|
|
|
install-include-dirs: headers
|
|
|
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
2013-03-19 18:28:32 -04:00
|
|
|
|
2013-12-26 19:44:03 -05:00
|
|
|
install-headers: install-include-dirs headers
|
|
|
|
cp -RTv include $(DESTDIR)$(INCLUDEDIR)
|
2013-03-19 18:28:32 -04:00
|
|
|
|
|
|
|
install-lib-dirs: $(DESTDIR)$(LIBDIR)
|
|
|
|
|
|
|
|
install-libs: $(INSTALLLIBS)
|
|
|
|
|
|
|
|
install-libs-kernel: $(INSTALLLIBSKERNEL)
|
2011-09-15 16:38:40 -04:00
|
|
|
|