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