mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
Setup CRTDLL config to build DLL
svn path=/trunk/; revision=362
This commit is contained in:
parent
a3576ceb06
commit
fbe6ae7bc0
3 changed files with 107 additions and 3 deletions
78
reactos/lib/crtdll/crt_specs
Normal file
78
reactos/lib/crtdll/crt_specs
Normal file
|
@ -0,0 +1,78 @@
|
|||
*asm:
|
||||
|
||||
|
||||
*asm_final:
|
||||
|
||||
|
||||
*cpp:
|
||||
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}
|
||||
|
||||
*cc1:
|
||||
%(cc1_spec)
|
||||
|
||||
*cc1plus:
|
||||
|
||||
|
||||
*endfile:
|
||||
|
||||
|
||||
*link:
|
||||
%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMain@12}
|
||||
|
||||
*lib:
|
||||
|
||||
|
||||
*libgcc:
|
||||
-lgcc
|
||||
|
||||
*startfile:
|
||||
|
||||
|
||||
*switches_need_spaces:
|
||||
|
||||
|
||||
*signed_char:
|
||||
%{funsigned-char:-D__CHAR_UNSIGNED__}
|
||||
|
||||
*predefines:
|
||||
-Di386 -D_WIN32 -DWIN32 -D__WIN32__ -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) _D_stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -Asystem(winnt) -Acpu(i386) -Amachine(i386)
|
||||
|
||||
*cross_compile:
|
||||
1
|
||||
|
||||
*version:
|
||||
egcs-2.91.57
|
||||
|
||||
*multilib:
|
||||
. ;
|
||||
|
||||
*multilib_defaults:
|
||||
|
||||
|
||||
*multilib_extra:
|
||||
|
||||
|
||||
*multilib_matches:
|
||||
|
||||
|
||||
*linker:
|
||||
collect2
|
||||
|
||||
*cpp_486:
|
||||
%{!ansi:-Di486} -D__i486 -D__i486__
|
||||
|
||||
*cpp_586:
|
||||
%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
|
||||
|
||||
*cpp_686:
|
||||
%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
|
||||
|
||||
*cpp_cpu_default:
|
||||
%(cpp_586)
|
||||
|
||||
*cpp_cpu:
|
||||
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
|
||||
|
||||
*cc1_cpu:
|
||||
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
|
||||
|
|
@ -1,5 +1,15 @@
|
|||
|
||||
all: crtdll.a
|
||||
ifneq ($(HOST),mingw32-windows)
|
||||
ifneq ($(HOST),mingw32-linux)
|
||||
DLLTARGET=crtdll.a
|
||||
else
|
||||
DLLTARGET=crtdll.dll
|
||||
endif
|
||||
else
|
||||
DLLTARGET=crtdll.dll
|
||||
endif
|
||||
|
||||
all: $(DLLTARGET)
|
||||
|
||||
|
||||
ASSERT_OBJECTS = assert/assert.o
|
||||
|
@ -91,7 +101,23 @@ OBJECTS = $(ASSERT_OBJECTS) $(CTYPE_OBJECTS) $(CONIO_OBJECTS) $(DIRECT_OBJECTS)\
|
|||
crtdll.a: $(OBJECTS)
|
||||
$(LD) -r $(OBJECTS) -o crtdll.a
|
||||
|
||||
dummy:
|
||||
crtdll.dll: $(DLLMAIN) $(OBJECTS) crtdll.def
|
||||
$(LD) -r $(OBJECTS) -o crtdll.o
|
||||
$(DLLTOOL) --dllname crtdll.dll --def crtdll.def \
|
||||
--output-lib crtdll.a
|
||||
$(CC) -specs=crt_specs -mdll -o junk.tmp \
|
||||
-Wl,--base-file,base.tmp crtdll.o ../ntdll/ntdll.a
|
||||
- $(RM) junk.tmp
|
||||
$(DLLTOOL) --dllname crtdll.dll --base-file base.tmp \
|
||||
--output-exp temp.exp --def crtdll.def
|
||||
- $(RM) base.tmp
|
||||
$(CC) -specs=crt_specs -mdll -o crtdll.dll crtdll.o ../ntdll/ntdll.a\
|
||||
-Wl,--image-base,0x20000000 \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
-Wl,temp.exp
|
||||
- $(RM) temp.exp
|
||||
$(NM) --numeric-sort crtdll.dll > crtdll.sym
|
||||
|
||||
include ../../Rules.mak
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ include rules.mak
|
|||
#
|
||||
# Required to run the system
|
||||
#
|
||||
COMPONENTS = iface_native ntoskrnl ntdll kernel32
|
||||
# crtdll mingw32
|
||||
COMPONENTS = iface_native ntoskrnl ntdll kernel32
|
||||
|
||||
#
|
||||
# Select the server(s) you want to build
|
||||
|
|
Loading…
Reference in a new issue