Subversion Repositories Kolibri OS

Rev

Rev 4349 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4349 Rev 4866
Line 1... Line 1...
1
CC = gcc
1
CC = kos32-gcc
2
AR = ar rc
2
AR = kos32-ar
3
LD = ld
3
LD = kos32-ld
Line 4... Line 4...
4
 
4
 
5
CFLAGS = -c -O2 -fomit-frame-pointer -DBUILD_DLL
5
CFLAGS = -c -O2 -fomit-frame-pointer -DBUILD_DLL
-
 
6
LDFLAGS = -shared -s -T libcdll.lds --out-implib libc.dll.a --image-base 0
-
 
7
#LDFLAGS+= --output-def libc.orig.def
-
 
8
ARFLAGS = crs
Line 6... Line 9...
6
LDFLAGS = -nostdlib -shared -s -T libcdll.lds --output-def libc.orig.def --out-implib libc.dll.a --image-base 0
9
 
7
 
10
 
Line 8... Line 11...
8
LIBC_TOPDIR   = .
11
LIBC_TOPDIR   = .
Line 9... Line 12...
9
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
12
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
Line 10... Line 13...
10
 
13
 
Line 11... Line 14...
11
NAME:=	  libc
14
NAME:=	  libc
Line 12... Line 15...
12
 
15
 
13
DEFINES:= -D_IEEE_LIBM
16
DEFINES:= -D_IEEE_LIBM
14
 
17
 
15
INCLUDES:=  -I $(LIBC_INCLUDES)
18
INCLUDES:=  -I $(LIBC_INCLUDES)
Line 52... Line 55...
52
         		crt/emutls.c         	\
55
         		crt/emutls.c         	\
53
         		crt/thread.S         	\
56
         		crt/thread.S         	\
54
         		crt/tls.S            	\
57
         		crt/tls.S            	\
55
			crt/setjmp.S		\
58
			crt/setjmp.S		\
56
         		crt/assert.c         	\
59
			crt/cpu_features.c	\
57
			crt/cpu_features.c	\
-
 
58
			ctype/ctype_.c 		\
60
			ctype/ctype_.c 		\
59
			ctype/isascii.c		\
61
			ctype/isascii.c		\
60
			ctype/isblank.c		\
62
			ctype/isblank.c		\
61
         		ctype/isalnum.c      	\
63
         		ctype/isalnum.c      	\
62
         		ctype/isalpha.c      	\
64
         		ctype/isalpha.c      	\
Line 137... Line 139...
137
         		__atexit.c          	\
139
         		__atexit.c          	\
138
         		__call_atexit.c     	\
140
         		__call_atexit.c     	\
139
         		abort.c              	\
141
         		abort.c              	\
140
         		abs.c               	\
142
         		abs.c               	\
141
         		atof.c              	\
143
			assert.c		\
-
 
144
			atexit.c		\
-
 
145
         		atof.c              	\
142
         		atoi.c              	\
146
         		atoi.c              	\
143
			atol.c			\
147
			atol.c			\
144
         		div.c               	\
148
         		div.c               	\
145
         		dtoa.c               	\
149
         		dtoa.c               	\
146
         		dtoastub.c          	\
150
         		dtoastub.c          	\
Line 373... Line 377...
373
 
377
 
Line 374... Line 378...
374
 
378
 
375
$(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile
379
$(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile
376
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver
380
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver
377
	sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
381
	#sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
378
	sed -f cmd2.sed libc.def > mem
382
	#sed -f cmd2.sed libc.def > mem
Line 379... Line 383...
379
	sed -f newlib.sed mem > libc.inc
383
	#sed -f newlib.sed mem > libc.inc
380
 
384
 
381
install: libc.dll libc.dll.a libapp.a libdll.a
385
install: libc.dll libc.dll.a libapp.a libdll.a
382
	mv -f libc.dll ../../bin
386
	mv -f libc.dll ../../bin
383
	mv -f libc.dll.a ../../lib   
387
	mv -f libc.dll.a ../../lib   
Line 384... Line 388...
384
	mv -f libapp.a ../../lib
388
	mv -f libapp.a ../../lib
385
	mv -f libdll.a ../../lib
389
	mv -f libdll.a ../../lib
Line 386... Line 390...
386
 
390
 
387
libapp.a: $(LIBCRT_OBJS) Makefile
391
libapp.a: $(LIBCRT_OBJS) Makefile
Line 388... Line 392...
388
	$(AR) libapp.a $(LIBCRT_OBJS)
392
	$(AR) $(ARFLAGS) libapp.a $(LIBCRT_OBJS)
Line 389... Line 393...
389
 
393
 
390
libdll.a: $(LIBDLL_OBJS) Makefile
394
libdll.a: $(LIBDLL_OBJS) Makefile
Line 391... Line 395...
391
	$(AR) libdll.a $(LIBDLL_OBJS)
395
	$(AR) $(ARFLAGS) libdll.a $(LIBDLL_OBJS)
392
 
396