1 # $Id: makefile,v 1.36 2000/01/23 08:16:20 phreak Exp $
3 # ReactOS Operating System
7 BASE_CFLAGS = -I../../include -D__NTDLL__
9 include ../../rules.mak
10 IMAGE_BASE = 0x77f60000
12 ifneq ($(HOST),mingw32-windows)
13 ifneq ($(HOST),mingw32-linux)
17 DLLTARGET=$(TARGET).dll
18 DLLMAIN=main/dllmain.o
21 DLLTARGET=$(TARGET).dll
22 DLLMAIN=main/dllmain.o
27 CSR_OBJECTS = csr/api.o
29 DBG_OBJECTS = dbg/brkpoint.o dbg/print.o
31 RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
32 rtl/math.o rtl/mem.o rtl/nls.o rtl/process.o rtl/security.o \
33 rtl/thread.o rtl/unicode.o rtl/env.o
35 STDIO_OBJECTS = stdio/sprintf.o stdio/swprintf.o
37 STDLIB_OBJECTS = stdlib/abs.o stdlib/atoi.o stdlib/atoi64.o stdlib/atol.o \
38 stdlib/itoa.o stdlib/itow.o stdlib/labs.o stdlib/splitp.o \
39 stdlib/strtol.o stdlib/strtoul.o stdlib/wcstol.o \
40 stdlib/wcstoul.o stdlib/wtoi.o stdlib/wtoi64.o stdlib/wtol.o \
41 stdlib/mbstowcs.o stdlib/wcstombs.o
43 STRING_OBJECTS = string/ctype.o string/memccpy.o string/memchr.o \
44 string/memcmp.o string/memcpy.o string/memicmp.o\
45 string/memmove.o string/memset.o string/strcat.o \
46 string/strchr.o string/strcmp.o string/strcspn.o \
47 string/strcpy.o string/stricmp.o string/strlen.o \
48 string/strlwr.o string/strncat.o string/strncmp.o \
49 string/strncpy.o string/strnicmp.o string/strnlen.o \
50 string/strpbrk.o string/strrchr.o string/strspn.o \
51 string/strstr.o string/strupr.o string/wstring.o
53 OBJECTS = napi.o ldr/startup.o $(DBG_OBJECTS) $(RTL_OBJECTS) \
54 $(STDIO_OBJECTS) $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
55 stubs/stubs.o ldr/utils.o $(CSR_OBJECTS) $(TARGET).coff
58 CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o stdlib\*.o string\*.o stubs\*.o \
59 $(TARGET).a main\dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
60 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
62 CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o stdlib/*.o string/*.o stubs/*.o \
63 $(TARGET).a main/dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
64 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
67 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
69 $(TARGET).a: $(OBJECTS)
70 $(AR) csr $(TARGET).a $(OBJECTS)
72 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
78 --dllname $(TARGET).dll \
79 --def def/$(TARGET).def \
81 --output-lib $(TARGET).a
83 -specs=$(TARGET)_specs \
86 -Wl,--base-file,base.tmp \
90 --dllname $(TARGET).dll \
91 --base-file base.tmp \
92 --output-exp temp.exp \
93 --def def/$(TARGET).edf
96 -specs=$(TARGET)_specs \
100 -Wl,--entry=_LdrStartup \
101 -Wl,--image-base,$(IMAGE_BASE) \
102 -Wl,--file-alignment,0x1000 \
103 -Wl,--section-alignment,0x1000 \
106 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
108 clean: $(CLEAN_FILES:%=%_clean)
110 $(CLEAN_FILES:%=%_clean): %_clean:
113 .PHONY: clean $(CLEAN_FILES:%=%_clean)
115 floppy: $(FLOPPY_DIR)/dlls/$(TARGET).dll
117 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
119 $(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
121 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
124 dist: $(DIST_DIR)/dlls/$(TARGET).dll
126 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
128 $(CP) $(TARGET).dll ..\..\$(DIST_DIR)\dlls\$(TARGET).dll
130 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
133 #WARNINGS_ARE_ERRORS = yes