_itow, _ltow, _ultow added to crtdll.
[reactos.git] / reactos / lib / crtdll / makefile
1 # $Id: makefile,v 1.42 2000/12/22 23:15:18 ea Exp $
2 #
3 # ReactOS Operating System
4 #
5 PATH_TO_TOP = ../..
6
7 TARGET=crtdll
8 DLLTARGET=$(TARGET).dll
9
10
11 CFLAGS =
12
13 all: $(DLLTARGET)
14
15
16 ASSERT_OBJECTS = assert/assert.o
17
18 CTYPE_OBJECTS = ctype/isalnum.o \
19 ctype/isalpha.o ctype/isascii.o ctype/iscntrl.o ctype/isdigit.o ctype/isgraph.o \
20 ctype/islower.o ctype/isprint.o ctype/ispunct.o ctype/isspace.o ctype/isupper.o \
21 ctype/isxdigit.o ctype/toascii.o ctype/tolower.o ctype/toupper.o\
22 ctype/iscsym.o ctype/isctype.o
23
24 CONIO_OBJECTS = conio/cputs.o conio/getch.o conio/getche.o conio/putch.o conio/ungetch.o\
25 conio/kbhit.o conio/cgets.o conio/cprintf.o conio/cscanf.o
26
27 DIRECT_OBJECTS = direct/chdir.o direct/chdrive.o direct/getcwd.o direct/getdrive.o \
28 direct/rmdir.o direct/mkdir.o direct/getdfree.o direct/getdcwd.o
29
30 EXCEPT_OBJECTS = except/unwind.o except/abnorter.o except/exhand2.o except/matherr.o
31
32 LOCALE_OBJECTS = locale/locale.o
33
34 MALLOC_OBJECTS = malloc/expand.o malloc/heap.o
35
36
37 MISC_OBJECTS = misc/GetArgs.o misc/dllmain.o misc/setnew.o misc/purecall.o misc/initterm.o\
38 misc/amsg.o
39
40 MBSTRING_OBJECTS = mbstring/mbsnicmp.o mbstring/mbsnset.o mbstring/mbsnextc.o mbstring/mbsnicoll.o mbstring/islead.o mbstring/mbsspnp.o \
41 mbstring/mbspbrk.o mbstring/mbsspn.o mbstring/mbbtype.o mbstring/mbscat.o mbstring/mbschr.o \
42 mbstring/mbccpy.o mbstring/mbslen.o mbstring/mbsrchr.o mbstring/mbsset.o mbstring/mbsncat.o mbstring/mbsncmp.o \
43 mbstring/mbscmp.o mbstring/mbsncoll.o mbstring/mbscoll.o mbstring/mbsncpy.o mbstring/mbscpy.o mbstring/mbscspn.o \
44 mbstring/mbsdup.o mbstring/mbsicmp.o mbstring/mbsicoll.o mbstring/mbsnccnt.o mbstring/mbsrev.o mbstring/mbsstr.o \
45 mbstring/mbsinc.o mbstring/mbsdec.o mbstring/mbsninc.o mbstring/mbclen.o mbstring/iskana.o mbstring/jmstojis.o \
46 mbstring/jistojms.o mbstring/iskpun.o mbstring/iskmoji.o mbstring/ismbgra.o mbstring/ismbpri.o mbstring/isuppr.o \
47 mbstring/islwr.o mbstring/ismbkaln.o mbstring/mbstrlen.o mbstring/ismbc.o \
48 mbstring/ismbtrl.o mbstring/ismblead.o mbstring/ischira.o mbstring/hanzen.o mbstring/ismbaln.o mbstring/ismbal.o \
49 mbstring/ismbpun.o mbstring/mbslwr.o mbstring/mbsupr.o mbstring/mbstok.o
50
51 STRING_OBJECTS = string/memchr.o string/memcmp.o string/strcat.o \
52 string/strchr.o string/strcmp.o string/strcoll.o \
53 string/strcpy.o string/strcspn.o string/memcpy.o \
54 string/strlen.o string/strncat.o string/strncmp.o \
55 string/strncpy.o string/strpbrk.o string/strrchr.o \
56 string/strspn.o string/strstr.o string/strtok.o \
57 string/strxfrm.o string/memmove.o string/memset.o \
58 string/strdup.o string/strlwr.o string/strupr.o \
59 string/str_old.o string/strerror.o string/stricmp.o\
60 string/strnlen.o string/strnicmp.o string/strrev.o\
61 string/memccpy.o string/memicmp.o string/strset.o
62
63 WCHAR_OBJECTS = wchar/wcscat.o wchar/wcschr.o wchar/wcscmp.o \
64 wchar/wcscoll.o wchar/wcscpy.o wchar/wcscspn.o \
65 wchar/wcsdup.o wchar/wcsicmp.o wchar/wcslen.o \
66 wchar/wcslwr.o wchar/wcsncat.o wchar/wcsncmp.o \
67 wchar/wcsncpy.o wchar/wcsnlen.o wchar/wcspbrk.o wchar/wcsrchr.o\
68 wchar/wcsrev.o wchar/wcsset.o wchar/wcsspn.o wchar/wcsstr.o\
69 wchar/wcstod.o wchar/wcstok.o wchar/wcstol.o wchar/wcsupr.o\
70 wchar/wcsxfrm.o wchar/wtoi.o wchar/wcstombs.o wchar/wcsnicmp.o
71
72 SETJMP_OBJECTS = setjmp/setjmp.o
73
74 STDIO_OBJECTS = stdio/getenv.o stdio/filbuf.o \
75 stdio/fclose.o stdio/feof.o stdio/ferror.o stdio/fileno.o\
76 stdio/fflush.o stdio/fgetc.o stdio/fgetpos.o stdio/fgets.o stdio/flsbuf.o \
77 stdio/fopen.o stdio/fprintf.o stdio/fputc.o stdio/fputs.o stdio/setvbuf.o\
78 stdio/fread.o stdio/freopen.o stdio/fscanf.o stdio/fseek.o \
79 stdio/fsetpos.o stdio/ftell.o stdio/fwalk.o stdio/fwrite.o stdio/getc.o \
80 stdio/getchar.o stdio/gets.o stdio/getw.o stdio/perror.o stdio/clearerr.o \
81 stdio/putc.o stdio/putchar.o stdio/puts.o stdio/putw.o stdio/fputchar.o\
82 stdio/remove.o stdio/rename.o stdio/rewind.o stdio/allocfil.o\
83 stdio/setbuf.o stdio/setbuffe.o stdlib/obsol.o stdio/setlineb.o\
84 stdio/scanf.o stdio/sscanf.o stdio/vscanf.o stdio/vsscanf.o stdio/vfscanf.o\
85 stdio/stdiohk.o stdio/stdhnd.o stdio/tempnam.o stdio/tmpfile.o stdio/tmpnam.o \
86 stdio/ungetc.o stdio/printf.o stdio/vfprintf.o stdio/vprintf.o stdio/sprintf.o\
87 stdio/fdopen.o stdio/vsprintf.o stdio/frlist.o stdio/fgetchar.o stdio/rmtmp.o\
88 stdio/fsopen.o stdio/popen.o stdio/vfwprint.o
89
90 QUAD_OBJECTS = quad/qdivrem.o quad/divdi3.o quad/moddi3.o quad/udivdi3.o quad/umoddi3.o
91
92 IO_OBJECTS = io/access.o io/close.o io/create.o io/dup.o io/dup2.o io/find.o io/isatty.o io/lseek.o \
93 io/open.o io/read.o io/setmode.o io/unlink.o io/write.o io/fmode.o io/mktemp.o\
94 io/chmod.o io/chsize.o io/commit.o io/locking.o io/pipe.o io/sopen.o io/filelen.o\
95 io/umask.o io/tell.o io/eof.o io/utime.o
96
97 SEARCH_OBJECTS = search/lsearch.o search/lfind.o
98
99 STDLIB_OBJECTS = stdlib/abort.o stdlib/abs.o stdlib/atexit.o stdlib/atof.o stdlib/atoi.o \
100 stdlib/bsearch.o stdlib/div.o stdlib/errno.o stdlib/_exit.o \
101 stdlib/fullpath.o stdlib/labs.o stdlib/ldiv.o stdlib/itoa.o\
102 stdlib/makepath.o stdlib/malloc.o stdlib/putenv.o stdlib/qsort.o \
103 stdlib/rand.o stdlib/senv.o stdlib/splitp.o stdlib/strtod.o stdlib/strtol.o \
104 stdlib/strtoul.o stdlib/swab.o stdlib/atol.o stdlib/rot.o stdlib/wcstomb.o\
105 stdlib/ecvt.o stdlib/ecvtbuf.o stdlib/gcvt.o stdlib/fcvt.o stdlib/fcvtbuf.o\
106 stdlib/mbstowcs.o stdlib/itow.o
107
108 SIGNAL_OBJECTS = signal/signal.o signal/xcptfil.o signal/xcptinfo.o
109
110 PROCESS_OBJECTS = process/_cwait.o process/dll.o process/spawnl.o process/spawnlp.o process/spawnlpe.o process/spawnvpe.o process/spawnvp.o \
111 process/spawnv.o process/spawnve.o process/spawnle.o process/execl.o process/execlp.o process/execlpe.o \
112 process/execvpe.o process/execvp.o process/execv.o process/execle.o process/_system.o\
113 process/execve.o process/threadid.o process/thread.o process/procid.o
114
115 TCHAR_OBJECTS = tchar/strdec.o tchar/strinc.o tchar/strninc.o tchar/strncnt.o tchar/strnextc.o tchar/strspnp.o
116
117 TIME_OBJECTS = time/ctime.o time/difftime.o time/strftime.o time/time.o time/clock.o time/strdate.o\
118 time/strtime.o
119
120 FLOAT_OBJECTS = float/fpreset.o float/clearfp.o float/cntrlfp.o float/statfp.o float/logb.o\
121 float/chgsign.o float/fpclass.o float/isnan.o float/nafter.o float/scalb.o\
122 float/copysign.o
123
124 SYS_STAT_OBJECTS = sys_stat/fstat.o sys_stat/stat.o sys_stat/futime.o sys_stat/ftime.o\
125 sys_stat/systime.o
126
127
128
129 MATH_OBJECTS = math/acos.o math/acosh.o math/asin.o math/asinh.o math/atan.o math/atan2.o\
130 math/atanh.o math/ceil.o math/cos.o math/cosh.o math/exp.o math/fabs.o\
131 math/floor.o math/fmod.o math/frexp.o math/huge_val.o math/hypot.o\
132 math/ldexp.o math/log.o math/log10.o math/modf.o math/pow.o\
133 math/sin.o math/sinh.o math/sqrt.o math/tan.o\
134 math/tanh.o math/stubs.o math/j0_y0.o math/j1_y1.o math/jn_yn.o\
135 math/cabs.o math/ftol.o
136
137 RESOURCE_OBJECT = $(TARGET).coff
138
139 OBJECTS = $(MISC_OBJECTS) $(STDLIB_OBJECTS) $(IO_OBJECTS) \
140 $(FLOAT_OBJECTS) $(ASSERT_OBJECTS) $(PROCESS_OBJECTS) \
141 $(STDIO_OBJECTS) $(CTYPE_OBJECTS) $(MATH_OBJECTS) \
142 $(STRING_OBJECTS) $(TIME_OBJECTS) $(WCHAR_OBJECTS) \
143 $(SYS_STAT_OBJECTS) $(MALLOC_OBJECTS) $(MBSTRING_OBJECTS)\
144 $(SEARCH_OBJECTS) $(CONIO_OBJECTS) $(DIRECT_OBJECTS) \
145 $(SIGNAL_OBJECTS) $(SETJMP_OBJECTS) $(RESOURCE_OBJECT) \
146 $(LOCALE_OBJECTS) $(EXCEPT_OBJECTS) $(TCHAR_OBJECTS)
147
148 ifeq ($(DOSCLI), yes)
149 CLEAN_FILES = assert\*.o conio\*.o ctype\*.o direct\*.o dirent\*.o \
150 except\*.o float\*.o io\*.o libc\*.o locale\*.o malloc\*.o \
151 math\*.o mbstring\*.o misc\*.o process\*.o quad\*.o search\*.o \
152 setjmp\*.o stdio\*.o stdlib\*.o string\*.o sys_stat\*.o tchar\*.o \
153 time\*.o wchar\*.o $(TARGET).a $(TARGET).o $(TARGET).dll $(TARGET).sym \
154 $(TARGET).coff
155 else
156 CLEAN_FILES = assert/*.o conio/*.o ctype/*.o direct/*.o dirent/*.o \
157 except/*.o float/*.o io/*.o libc/*.o locale/*.o malloc/*.o \
158 math/*.o mbstring/*.o misc/*.o process/*.o quad/*.o search/*.o \
159 setjmp/*.o stdio/*.o stdlib/*.o string/*.o sys_stat/*.o tchar/*.o \
160 time/*.o wchar/*.o $(TARGET).a $(TARGET).o $(TARGET).dll $(TARGET).sym \
161 $(TARGET).coff $(SIGNAL_OBJECTS)
162 endif
163
164 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
165
166 $(TARGET).a: $(OBJECTS)
167 $(LD) -r $(OBJECTS) -o $(TARGET).a
168
169 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
170 $(LD) -r $(OBJECTS) -o $(TARGET).o
171 $(DLLTOOL) \
172 --dllname $(TARGET).dll \
173 --def $(TARGET).def \
174 --output-lib $(TARGET).a
175 $(CC) \
176 -nostartfiles -nostdlib \
177 -mdll \
178 -o junk.tmp \
179 -Wl,--base-file,base.tmp \
180 -Wl,--entry=_DllMain@12 \
181 $(TARGET).o \
182 ../kernel32/kernel32.a -lgcc
183 - $(RM) junk.tmp
184 $(DLLTOOL) \
185 --dllname $(TARGET).dll \
186 --base-file base.tmp \
187 --output-exp temp.exp \
188 --def $(TARGET).def
189 - $(RM) base.tmp
190 $(CC) \
191 -nostartfiles -nostdlib \
192 -mdll \
193 -o $(TARGET).dll \
194 $(TARGET).o \
195 ../kernel32/kernel32.a -lgcc \
196 -Wl,--image-base,0x77630000 \
197 -Wl,--file-alignment,0x1000 \
198 -Wl,--section-alignment,0x1000 \
199 -Wl,temp.exp \
200 -Wl,--entry=_DllMain@12
201 - $(RM) temp.exp
202 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
203
204 clean: $(CLEAN_FILES:%=%_clean)
205
206 $(CLEAN_FILES:%=%_clean): %_clean:
207 - $(RM) $*
208
209 install: $(FLOPPY_DIR)/dlls/$(TARGET).dll
210
211 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
212 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
213
214 dist: $(DIST_DIR)/dlls/$(TARGET).dll
215
216 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
217 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
218
219 include ../../rules.mak
220