1 # $Id: makefile,v 1.34 2000/01/10 20:34:41 ekohl Exp $
3 # ReactOS Operating System
7 BASE_CFLAGS = -I../../include -D__NTDLL__
9 IMAGE_BASE = 0x77f60000
11 ifneq ($(HOST),mingw32-windows)
12 ifneq ($(HOST),mingw32-linux)
16 DLLTARGET=$(TARGET).dll
17 DLLMAIN=main/dllmain.o
20 DLLTARGET=$(TARGET).dll
21 DLLMAIN=main/dllmain.o
26 CSR_OBJECTS = csr/api.o
28 DBG_OBJECTS = dbg/brkpoint.o dbg/print.o
30 RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
31 rtl/math.o rtl/mem.o rtl/nls.o rtl/process.o rtl/security.o \
32 rtl/thread.o rtl/unicode.o rtl/env.o
34 STDIO_OBJECTS = stdio/swprintf.o stdio/vsprintf.o
36 STDLIB_OBJECTS = stdlib/abs.o stdlib/atoi.o stdlib/atoi64.o stdlib/atol.o \
37 stdlib/itoa.o stdlib/itow.o stdlib/labs.o stdlib/splitp.o \
38 stdlib/strtol.o stdlib/strtoul.o stdlib/wcstol.o \
39 stdlib/wcstoul.o stdlib/wtoi.o stdlib/wtoi64.o stdlib/wtol.o \
40 stdlib/mbstowcs.o stdlib/wcstombs.o
42 STRING_OBJECTS = string/ctype.o string/memccpy.o string/memchr.o \
43 string/memcmp.o string/memcpy.o string/memicmp.o\
44 string/memmove.o string/memset.o string/strcat.o \
45 string/strchr.o string/strcmp.o string/strcspn.o \
46 string/strcpy.o string/stricmp.o string/strlen.o \
47 string/strlwr.o string/strncat.o string/strncmp.o \
48 string/strncpy.o string/strnicmp.o string/strnlen.o \
49 string/strpbrk.o string/strrchr.o string/strspn.o \
50 string/strstr.o string/strupr.o string/wstring.o
52 OBJECTS = napi.o ldr/startup.o $(DBG_OBJECTS) $(RTL_OBJECTS) \
53 $(STDIO_OBJECTS) $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
54 stubs/stubs.o ldr/utils.o $(CSR_OBJECTS) $(TARGET).coff
57 CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o stdlib\*.o string\*.o stubs\*.o \
58 $(TARGET).a main\dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
59 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
61 CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o stdlib/*.o string/*.o stubs/*.o \
62 $(TARGET).a main/dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
63 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
66 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
68 $(TARGET).a: $(OBJECTS)
69 $(AR) csr $(TARGET).a $(OBJECTS)
71 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
77 --dllname $(TARGET).dll \
78 --def def/$(TARGET).def \
80 --output-lib $(TARGET).a
82 -specs=$(TARGET)_specs \
85 -Wl,--base-file,base.tmp \
89 --dllname $(TARGET).dll \
90 --base-file base.tmp \
91 --output-exp temp.exp \
92 --def def/$(TARGET).edf
95 -specs=$(TARGET)_specs \
99 -Wl,--entry=_LdrStartup \
100 -Wl,--image-base,$(IMAGE_BASE) \
101 -Wl,--file-alignment,0x1000 \
102 -Wl,--section-alignment,0x1000 \
105 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
107 clean: $(CLEAN_FILES:%=%_clean)
109 $(CLEAN_FILES:%=%_clean): %_clean:
112 .PHONY: clean $(CLEAN_FILES:%=%_clean)
114 floppy: $(FLOPPY_DIR)/dlls/$(TARGET).dll
116 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
118 $(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
120 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
123 dist: $(DIST_DIR)/dlls/$(TARGET).dll
125 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
127 $(CP) $(TARGET).dll ..\..\$(DIST_DIR)\dlls\$(TARGET).dll
129 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
132 #WARNINGS_ARE_ERRORS = yes
133 include ../../rules.mak