forked from KolibriOS/kolibrios
sdk: update makefiles
git-svn-id: svn://kolibrios.org@4930 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
@@ -9,6 +8,7 @@ LDFLAGS = -shared -s -T libcdll.lds --out-implib libc.dll.a --image-base 0
|
||||
#LDFLAGS+= --output-def libc.orig.def
|
||||
ARFLAGS = crs
|
||||
|
||||
SDK_DIR:= $(abspath ../../..)
|
||||
|
||||
LIBC_TOPDIR = .
|
||||
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
|
||||
@@ -19,7 +19,7 @@ DEFINES:= -D_IEEE_LIBM
|
||||
|
||||
INCLUDES:= -I $(LIBC_INCLUDES)
|
||||
|
||||
LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib
|
||||
LIBPATH:= -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
STATIC_SRCS:= \
|
||||
crt/start.S \
|
||||
@@ -400,10 +400,10 @@ $(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile
|
||||
#sed -f newlib.sed mem > libc.inc
|
||||
|
||||
install: libc.dll libc.dll.a libapp.a libdll.a
|
||||
mv -f libc.dll ../../bin
|
||||
mv -f libc.dll.a ../../lib
|
||||
mv -f libapp.a ../../lib
|
||||
mv -f libdll.a ../../lib
|
||||
mv -f libc.dll $(SDK_DIR)/bin
|
||||
mv -f libc.dll.a $(SDK_DIR)/lib
|
||||
mv -f libapp.a $(SDK_DIR)/lib
|
||||
mv -f libdll.a $(SDK_DIR)/lib
|
||||
|
||||
libapp.a: $(LIBCRT_OBJS) Makefile
|
||||
$(AR) $(ARFLAGS) libapp.a $(LIBCRT_OBJS)
|
||||
|
@@ -1,10 +1,13 @@
|
||||
|
||||
CC = gcc
|
||||
AR = ar rc
|
||||
LD = ld
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
|
||||
CFLAGS = -c -O2 -march=pentium-mmx -fomit-frame-pointer -DBUILD_DLL
|
||||
CFLAGS = -c -O2 -march=pentium-mmx -fomit-frame-pointer -DBUILD_DLL -DMISSING_SYSCALL_NAMES
|
||||
LDFLAGS = -nostdlib -shared -s -T libcdll.lds --output-def libc.orig.def --out-implib libc.dll.a --image-base 0
|
||||
ARFLAGS = crs
|
||||
|
||||
SDK_DIR:= $(abspath ../../..)
|
||||
|
||||
LIBC_TOPDIR = .
|
||||
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
|
||||
@@ -15,7 +18,7 @@ DEFINES:= -D_IEEE_LIBM
|
||||
|
||||
INCLUDES:= -I $(LIBC_INCLUDES)
|
||||
|
||||
LIBPATH:= -L ../../lib
|
||||
LIBPATH:= -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
STATIC_SRCS:= \
|
||||
crt/start.S \
|
||||
@@ -54,7 +57,6 @@ CORE_SRCS:= \
|
||||
crt/thread.S \
|
||||
crt/tls.S \
|
||||
crt/setjmp.S \
|
||||
crt/assert.c \
|
||||
crt/cpu_features.c \
|
||||
ctype/ctype_.c \
|
||||
ctype/isascii.c \
|
||||
@@ -93,28 +95,43 @@ CORE_SRCS:= \
|
||||
errno/errno.c \
|
||||
locale/locale.c \
|
||||
locale/lctype.c \
|
||||
locale/ldpart.c \
|
||||
reent/impure.c \
|
||||
reent/init_reent.c \
|
||||
reent/getreent.c \
|
||||
reent/mutex.c \
|
||||
reent/gettimeofdayr.c \
|
||||
reent/hdlman.c \
|
||||
reent/isattyr.c \
|
||||
reent/openr.c \
|
||||
reent/closer.c \
|
||||
reent/linkr.c \
|
||||
reent/readr.c \
|
||||
reent/lseekr.c \
|
||||
reent/fstatr.c \
|
||||
reent/writer.c \
|
||||
reent/timesr.c \
|
||||
reent/unlinkr.c \
|
||||
search/qsort.c \
|
||||
search/bsearch.c \
|
||||
signal/signal.c \
|
||||
sys/close.c \
|
||||
sys/create.c \
|
||||
sys/delete.c \
|
||||
sys/errno.c \
|
||||
sys/finfo.c \
|
||||
sys/fsize.c \
|
||||
sys/fstat.c \
|
||||
sys/gettod.c \
|
||||
sys/io.c \
|
||||
sys/ioread.c \
|
||||
sys/iowrite.c \
|
||||
sys/isatty.c \
|
||||
sys/lseek.c \
|
||||
sys/open.c \
|
||||
sys/read.c \
|
||||
sys/unlink.c \
|
||||
sys/write.c \
|
||||
sys/fsize.c \
|
||||
sys/io_alloc.S \
|
||||
time/asctime.c \
|
||||
time/asctime_r.c \
|
||||
time/clock.c \
|
||||
@@ -130,6 +147,7 @@ CORE_SRCS:= \
|
||||
time/lcltime_r.c \
|
||||
time/strftime.c \
|
||||
time/time.c \
|
||||
time/timelocal.c \
|
||||
time/tzlock.c \
|
||||
time/tzvars.c
|
||||
|
||||
@@ -139,6 +157,8 @@ STDLIB_SRCS= \
|
||||
__call_atexit.c \
|
||||
abort.c \
|
||||
abs.c \
|
||||
assert.c \
|
||||
atexit.c \
|
||||
atof.c \
|
||||
atoi.c \
|
||||
atol.c \
|
||||
@@ -248,7 +268,6 @@ STDIO_SRCS= \
|
||||
refill.c \
|
||||
rget.c \
|
||||
remove.c \
|
||||
rename.c \
|
||||
setvbuf.c \
|
||||
stdio.c \
|
||||
tmpfile.c \
|
||||
@@ -374,28 +393,28 @@ shared: $(NAME).dll libapp.a libdll.a
|
||||
|
||||
|
||||
$(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) --version-script libc.ver
|
||||
sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
|
||||
sed -f cmd2.sed libc.def > mem
|
||||
sed -f newlib.sed mem > libc.inc
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver
|
||||
#sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
|
||||
#sed -f cmd2.sed libc.def > mem
|
||||
#sed -f newlib.sed mem > libc.inc
|
||||
|
||||
install: libc.dll libc.dll.a libapp.a libdll.a
|
||||
mv -f libc.dll ../../bin
|
||||
mv -f libc.dll.a ../../lib
|
||||
mv -f libapp.a ../../lib
|
||||
mv -f libdll.a ../../lib
|
||||
mv -f libc.dll $(SDK_DIR)/bin
|
||||
mv -f libc.dll.a $(SDK_DIR)/lib
|
||||
mv -f libapp.a $(SDK_DIR)/lib
|
||||
mv -f libdll.a $(SDK_DIR)/lib
|
||||
|
||||
libapp.a: $(LIBCRT_OBJS) Makefile
|
||||
$(AR) libapp.a $(LIBCRT_OBJS)
|
||||
$(AR) $(ARFLAGS) libapp.a $(LIBCRT_OBJS)
|
||||
|
||||
libdll.a: $(LIBDLL_OBJS) Makefile
|
||||
$(AR) libdll.a $(LIBDLL_OBJS)
|
||||
$(AR) $(ARFLAGS) libdll.a $(LIBDLL_OBJS)
|
||||
|
||||
|
||||
static: $(NAME).a
|
||||
|
||||
$(NAME).a: $(LIB_OBJS) $(SRC_DEP) Makefile
|
||||
$(AR) $(NAME).a $(LIB_OBJS)
|
||||
$(AR) $(ARFLAGS) $(NAME).a $(LIB_OBJS)
|
||||
|
||||
|
||||
|
||||
|
@@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <gthr.h>
|
||||
|
||||
|
@@ -2,6 +2,9 @@
|
||||
assert.h
|
||||
*/
|
||||
|
||||
#ifndef __ASSERT_H__
|
||||
#define __ASSERT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -48,3 +51,5 @@ void _EXFUN(__assert_func, (const char *, int, const char *, const char *)
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSERT_H__ */
|
||||
|
@@ -177,8 +177,8 @@
|
||||
#define __PRI64(x) __STRINGIFY(l##x)
|
||||
#define __SCN64(x) __STRINGIFY(l##x)
|
||||
#elif __have_longlong64
|
||||
#define __PRI64(x) __STRINGIFY(ll##x)
|
||||
#define __SCN64(x) __STRINGIFY(ll##x)
|
||||
#define __PRI64(x) __STRINGIFY(I64##x)
|
||||
#define __SCN64(x) __STRINGIFY(I64##x)
|
||||
#else
|
||||
#define __PRI64(x) __STRINGIFY(x)
|
||||
#define __SCN64(x) __STRINGIFY(x)
|
||||
|
@@ -35,6 +35,7 @@ extern "C" {
|
||||
#define __have_long64 1
|
||||
#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
|
||||
#define __have_long32 1
|
||||
#define __have_long64 0
|
||||
#endif
|
||||
|
||||
#ifdef ___int8_t_defined
|
||||
|
@@ -22,7 +22,7 @@ extern "C" {
|
||||
#define stat64 stat
|
||||
#endif
|
||||
#else
|
||||
struct stat
|
||||
struct stat
|
||||
{
|
||||
dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
@@ -142,8 +142,6 @@ struct stat
|
||||
#define UTIME_OMIT -1L
|
||||
#endif
|
||||
|
||||
int _EXFUN(chmod,( const char *__path, mode_t __mode ));
|
||||
int _EXFUN(fchmod,(int __fd, mode_t __mode));
|
||||
int _EXFUN(fstat,( int __fd, struct stat *__sbuf ));
|
||||
int _EXFUN(mkdir,( const char *_path, mode_t __mode ));
|
||||
int _EXFUN(mkfifo,( const char *__path, mode_t __mode ));
|
||||
|
Reference in New Issue
Block a user