merge ROS Shell without integrated explorer part into trunk
[reactos.git] / reactos / subsys / system / explorer / Makefile.MinGW
1 #
2 # ReactOS explorer
3 #
4 # Makefile.MinGW
5 #
6
7 CC = gcc
8 CXX = g++
9 LINK = g++
10
11 # -D_NO_ALPHABLEND for builds without msimg32.dll dependency
12 CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -I. -I$(EXPAT_INC)
13 RCFLAGS = -DWIN32 -D__WINDRES__
14 LFLAGS = -Wl,--subsystem,windows
15
16 ifdef DEBUG
17 CFLAGS += -D_DEBUG -g
18 RCFLAGS += -D_DEBUG
19 LFLAGS += -g
20 else
21 CFLAGS += -DNDEBUG -Os
22 RCFLAGS += -DNDEBUG
23 LFLAGS += -s
24 endif
25
26 ifndef UNICODE
27 UNICODE = 1
28 endif
29
30 ifeq ($(UNICODE),1)
31 CFLAGS += -DUNICODE
32 # LFLAGS+= -Wl,--entry,_wWinMain@16
33 RCFLAGS += -DUNICODE
34 endif
35
36 CXXFLAGS = $(CFLAGS)
37
38 EXEC_SUFFIX = .exe
39 RES_SUFFIX = .coff
40
41 VPATH = shell utility taskbar desktop dialogs services
42
43 PROGRAM = explorer
44
45 TARGET = $(PROGRAM)$(EXEC_SUFFIX)
46
47 OBJECTS = \
48 startup.o \
49 shellclasses.o \
50 utility.o \
51 window.o \
52 dragdropimpl.o \
53 shellbrowserimpl.o \
54 shellservices.o \
55 explorer.o \
56 entries.o \
57 winfs.o \
58 unixfs.o \
59 shellfs.o \
60 ntobjfs.o \
61 regfs.o \
62 fatfs.o \
63 webchild.o \
64 mainframe.o \
65 filechild.o \
66 pane.o \
67 shellbrowser.o \
68 desktop.o \
69 desktopbar.o \
70 taskbar.o \
71 startmenu.o \
72 traynotify.o \
73 quicklaunch.o \
74 favorites.o \
75 searchprogram.o \
76 settings.o \
77 i386-stub-win32.o \
78 xmlstorage.o
79
80 LIBS = gdi32 comctl32 msimg32 ole32 uuid
81 DELAYIMPORTS = oleaut32 wsock32
82
83 all: $(TARGET)
84
85 $(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) notifyhook.dll libexpat.dll
86 $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS))
87
88 $(PROGRAM)$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico
89 windres $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc
90
91 notifyhook.dll: notifyhook/notifyhook.c notifyhook/notifyhook.h
92 $(CC) -D_WIN32_IE=0x0600 -Wall -D_NOTIFYHOOK_IMPL -Os -s notifyhook/notifyhook.c -shared -o $@
93
94 clean:
95 rm -f $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) \
96 desktop/*.o dialogs/*.o shell/*.o taskbar/*.o utility/*.o