1 # $Id: makefile,v 1.21 1999/07/29 21:14:02 ekohl Exp $
3 # ReactOS Operating System
7 IMAGE_BASE = 0x77f60000
9 ifneq ($(HOST),mingw32-windows)
10 ifneq ($(HOST),mingw32-linux)
14 DLLTARGET=$(TARGET).dll
15 DLLMAIN=main/dllmain.o
18 DLLTARGET=$(TARGET).dll
19 DLLMAIN=main/dllmain.o
24 RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
25 rtl/mem.o rtl/namespc.o rtl/security.o rtl/unicode.o
27 STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
28 stdlib/strtol.o stdlib/strtoul.o
30 STRING_OBJECTS = string/ctype.o string/memccpy.o string/memchr.o \
31 string/memcmp.o string/memcpy.o string/memicmp.o\
32 string/memmove.o string/memset.o string/strcat.o \
33 string/strchr.o string/strcmp.o string/strcspn.o \
34 string/strcpy.o string/stricmp.o string/strlen.o \
35 string/strlwr.o string/strncat.o string/strncmp.o \
36 string/strncpy.o string/strnicmp.o string/strnlen.o \
37 string/strpbrk.o string/strrchr.o string/strspn.o \
38 string/strstr.o string/strupr.o string/wstring.o
40 OBJECTS = napi.o ldr/startup.o $(RTL_OBJECTS) \
41 stdio/vsprintf.o $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
42 stubs/stubs.o ldr/utils.o $(TARGET).coff
45 CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o stdlib\*.o string\*.o stubs\*.o \
46 $(TARGET).a main\dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
47 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
49 CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o stdlib/*.o string/*.o stubs/*.o \
50 $(TARGET).a main/dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
51 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
54 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
56 $(TARGET).a: $(OBJECTS)
57 $(AR) csr $(TARGET).a $(OBJECTS)
59 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
65 --dllname $(TARGET).dll \
66 --def def/$(TARGET).def \
68 --output-lib $(TARGET).a
70 -specs=$(TARGET)_specs \
73 -Wl,--base-file,base.tmp \
77 --dllname $(TARGET).dll \
78 --base-file base.tmp \
79 --output-exp temp.exp \
80 --def def/$(TARGET).edf
83 -specs=$(TARGET)_specs \
87 -Wl,--entry=_LdrStartup \
88 -Wl,--image-base,$(IMAGE_BASE) \
89 -Wl,--file-alignment,0x1000 \
90 -Wl,--section-alignment,0x1000 \
93 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
95 clean: $(CLEAN_FILES:%=%_clean)
97 $(CLEAN_FILES:%=%_clean): %_clean:
100 .PHONY: clean $(CLEAN_FILES:%=%_clean)
102 floppy: $(FLOPPY_DIR)/dlls/$(TARGET).dll
104 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
106 $(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
108 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
111 dist: $(DIST_DIR)/dlls/$(TARGET).dll
113 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
115 $(CP) $(TARGET).dll ..\..\$(DIST_DIR)\dlls\$(TARGET).dll
117 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
120 #WARNINGS_ARE_ERRORS = yes
121 include ../../rules.mak