1 # $Id: makefile,v 1.22 1999/08/29 13:44:57 dwelch Exp $
3 # ReactOS Operating System
7 BASE_CFLAGS = -I../../include
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 RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
27 rtl/mem.o rtl/namespc.o rtl/security.o rtl/unicode.o
29 STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
30 stdlib/strtol.o stdlib/strtoul.o
32 STRING_OBJECTS = string/ctype.o string/memccpy.o string/memchr.o \
33 string/memcmp.o string/memcpy.o string/memicmp.o\
34 string/memmove.o string/memset.o string/strcat.o \
35 string/strchr.o string/strcmp.o string/strcspn.o \
36 string/strcpy.o string/stricmp.o string/strlen.o \
37 string/strlwr.o string/strncat.o string/strncmp.o \
38 string/strncpy.o string/strnicmp.o string/strnlen.o \
39 string/strpbrk.o string/strrchr.o string/strspn.o \
40 string/strstr.o string/strupr.o string/wstring.o
42 OBJECTS = napi.o ldr/startup.o $(RTL_OBJECTS) \
43 stdio/vsprintf.o $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
44 stubs/stubs.o ldr/utils.o $(TARGET).coff
47 CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o stdlib\*.o string\*.o stubs\*.o \
48 $(TARGET).a main\dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
49 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
51 CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o stdlib/*.o string/*.o stubs/*.o \
52 $(TARGET).a main/dllmain.o $(TARGET).o $(TARGET).dll junk.tmp \
53 base.tmp temp.exp $(TARGET).sym $(TARGET).coff
56 $(TARGET).coff: $(TARGET).rc ../../include/reactos/resource.h
58 $(TARGET).a: $(OBJECTS)
59 $(AR) csr $(TARGET).a $(OBJECTS)
61 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
67 --dllname $(TARGET).dll \
68 --def def/$(TARGET).def \
70 --output-lib $(TARGET).a
72 -specs=$(TARGET)_specs \
75 -Wl,--base-file,base.tmp \
79 --dllname $(TARGET).dll \
80 --base-file base.tmp \
81 --output-exp temp.exp \
82 --def def/$(TARGET).edf
85 -specs=$(TARGET)_specs \
89 -Wl,--entry=_LdrStartup \
90 -Wl,--image-base,$(IMAGE_BASE) \
91 -Wl,--file-alignment,0x1000 \
92 -Wl,--section-alignment,0x1000 \
95 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
97 clean: $(CLEAN_FILES:%=%_clean)
99 $(CLEAN_FILES:%=%_clean): %_clean:
102 .PHONY: clean $(CLEAN_FILES:%=%_clean)
104 floppy: $(FLOPPY_DIR)/dlls/$(TARGET).dll
106 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
108 $(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
110 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
113 dist: $(DIST_DIR)/dlls/$(TARGET).dll
115 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
117 $(CP) $(TARGET).dll ..\..\$(DIST_DIR)\dlls\$(TARGET).dll
119 $(CP) $(TARGET).dll ../../$(DIST_DIR)/dlls/$(TARGET).dll
122 #WARNINGS_ARE_ERRORS = yes
123 include ../../rules.mak