+# $Id: makefile,v 1.108 2004/08/10 12:03:29 ekohl Exp $
-ifneq ($(HOST),mingw32-windows)
- ifneq ($(HOST),mingw32-linux)
- DLLTARGET=ntdll.a
- DLLMAIN=
- else
- DLLTARGET=ntdll.dll
- DLLMAIN=main/dllmain.o
- endif
-else
- DLLTARGET=ntdll.dll
- DLLMAIN=main/dllmain.o
-endif
-
-all: $(DLLTARGET)
-
-STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
- stdlib/strtol.o stdlib/strtoul.o
-
-STRING_OBJECTS = string/ctype.o string/memcpy.o string/memmove.o \
- string/memset.o string/strcat.o string/strchr.o \
- string/strcmp.o string/strcspn.o \
- string/strcpy.o string/stricmp.o string/strlen.o \
- string/strncat.o string/strncmp.o string/strncpy.o \
- string/strnicmp.o string/strnlen.o string/strrchr.o \
- string/strstr.o string/strupr.o string/wstring.o
-
-OBJECTS = napi.o ldr/startup.o rtl/largeint.o rtl/namespc.o rtl/unicode.o \
- stdio/vsprintf.o $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
- stubs/stubs.o rtl/heap.o rtl/critical.o rtl/mem.o \
- ldr/utils.o
-
-ifeq ($(DOSCLI),yes)
-CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o string\*.o stubs\*.o ntdll.a \
- main\dllmain.o ntdll.o ntdll.dll junk.tmp base.tmp temp.exp ntdll.sym
-else
-CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o string/*.o stubs/*.o ntall.a \
- main/dllmain.o ntdll.o ntdll.dll junk.tmp base.tmp temp.exp ntdll.sym
-endif
-
-ntdll.a: $(OBJECTS)
- $(AR) csr ntdll.a $(OBJECTS)
-
-ntdll.dll: $(DLLMAIN) $(OBJECTS)
- $(LD) -r $(DLLMAIN) $(OBJECTS) -o ntdll.o
- $(DLLTOOL) --dllname ntdll.dll --def def/ntdll.def \
- --output-lib ntdll.a
- $(CC) -specs=ntdll_specs -mdll -o junk.tmp \
- -Wl,--base-file,base.tmp ntdll.o
- - $(RM) junk.tmp
- $(DLLTOOL) --dllname ntdll.dll --base-file base.tmp \
- --output-exp temp.exp --def def/ntdll.def
- - $(RM) base.tmp
- $(CC) -specs=ntdll_specs -mdll -o ntdll.dll ntdll.o \
- -Wl,--entry=_LdrStartup \
- -Wl,--image-base,0x80000000 \
- -Wl,--file-alignment,0x1000 \
- -Wl,--section-alignment,0x1000 \
- -Wl,temp.exp
- - $(RM) temp.exp
- $(NM) --numeric-sort ntdll.dll > ntdll.sym
-
-clean: $(CLEAN_FILES:%=%_clean)
-
-$(CLEAN_FILES:%=%_clean): %_clean:
- - $(RM) $*
-
-.PHONY: clean $(CLEAN_FILES:%=%_clean)
-
-#WARNINGS_ARE_ERRORS = yes
-include ../../rules.mak
+PATH_TO_TOP = ../..
+TARGET_BOOTSTRAP = yes
+
+TARGET_TYPE = dynlink
+
+TARGET_NAME = ntdll
+
+TARGET_CFLAGS = -g -D__NTDLL__ -Werror -Wall
+
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
+TARGET_ASFLAGS = -I $(PATH_TO_TOP)/include
+
+TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
+ -Wl,--section-alignment,0x1000 \
+ -nostartfiles -nostdlib
+
+TARGET_SDKLIBS = rosrtl.a rtl.a string.a
+
+TARGET_GCCLIBS = gcc
+
+TARGET_BASE = $(TARGET_BASE_LIB_NTDLL)
+
+TARGET_PATH = def
+
+TARGET_ENTRY = 0x0
+
+CSR_OBJECTS = \
+ csr/capture.o \
+ csr/lpc.o \
+ csr/probe.o \
+ csr/thread.o
+
+DBG_OBJECTS = \
+ dbg/brkpoint.o \
+ dbg/debug.o \
+ dbg/print.o
+
+LDR_OBJECTS = \
+ ldr/entry.o \
+ ldr/res.o \
+ ldr/startup.o \
+ ldr/utils.o
+
+RTL_I386_OBJECTS = \
+ rtl/i386/alldiv.o \
+ rtl/i386/allmul.o \
+ rtl/i386/allrem.o \
+ rtl/i386/allshl.o \
+ rtl/i386/allshr.o \
+ rtl/i386/aulldiv.o \
+ rtl/i386/aullrem.o \
+ rtl/i386/aullshr.o \
+ rtl/i386/chkstk.o \
+ rtl/i386/float.o \
+ rtl/i386/ftol.o
+
+RTL_OBJECTS = \
+ rtl/access.o \
+ rtl/apc.o \
+ rtl/atom.o \
+ rtl/callback.o \
+ rtl/crc32.o \
+ rtl/critical.o \
+ rtl/dbgbuffer.o \
+ rtl/exception.o \
+ rtl/handle.o \
+ rtl/intrlck.o \
+ rtl/math.o \
+ rtl/message.o \
+ rtl/misc.o \
+ rtl/path.o \
+ rtl/ppb.o \
+ rtl/process.o \
+ rtl/propvar.o \
+ rtl/rangelist.o \
+ rtl/registry.o \
+ rtl/resource.o \
+ rtl/teb.o \
+ rtl/thread.o \
+ rtl/timerqueue.o \
+ rtl/libsupp.o
+
+
+STDIO_OBJECTS = \
+ stdio/sprintf.o \
+ stdio/sscanf.o \
+ stdio/swprintf.o
+
+STDLIB_OBJECTS = \
+ stdlib/abs.o \
+ stdlib/atoi.o \
+ stdlib/atoi64.o \
+ stdlib/atol.o \
+ stdlib/bsearch.o \
+ stdlib/itoa.o \
+ stdlib/itow.o \
+ stdlib/labs.o \
+ stdlib/lfind.o \
+ stdlib/mbstowcs.o \
+ stdlib/splitp.o \
+ stdlib/strtol.o \
+ stdlib/strtoul.o \
+ stdlib/wcstol.o \
+ stdlib/wcstombs.o \
+ stdlib/wcstoul.o \
+ stdlib/wtoi.o \
+ stdlib/wtoi64.o \
+ stdlib/wtol.o
+
+STRING_OBJECTS = \
+ string/ctype.o \
+ string/memicmp.o \
+ string/stricmp.o \
+ string/strlwr.o \
+ string/strnicmp.o \
+ string/strpbrk.o \
+ string/strstr.o \
+ string/strupr.o \
+ string/wstring.o
+
+ARCH_OBJECTS = \
+ $(RTL_I386_OBJECTS)
+
+TARGET_OBJECTS = \
+ napi.o \
+ $(ARCH_OBJECTS) \
+ $(CSR_OBJECTS) \
+ $(DBG_OBJECTS) \
+ $(LDR_OBJECTS) \
+ $(RTL_OBJECTS) \
+ $(STDIO_OBJECTS) \
+ $(STDLIB_OBJECTS) \
+ $(STRING_OBJECTS)
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+DEP_EXCLUDE_FILTER = napi.%
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk
+
+%/TAGS:
+ etags -o $(@D)/TAGS $(@D)/\*.c
+
+etags: csr/TAGS dbg/TAGS ldr/TAGS main/TAGS rtl/TAGS stdio/TAGS stdlib/TAGS string/TAGS stubs/TAGS
+ etags -i csr/TAGS -i dbg/TAGS -i ldr/TAGS -i main/TAGS -i rtl/TAGS -i stdio/TAGS -i stdlib/TAGS -i string/TAGS -i stubs/TAGS
+
+
+docu:
+ doxygen Doxyfile
+
+.PHONY: docu
+
+
+# EOF