Winefile Makefile for pure MinGW
authorMartin Fuchs <fuchs.martin@gmail.com>
Sat, 13 Aug 2005 16:04:08 +0000 (16:04 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Sat, 13 Aug 2005 16:04:08 +0000 (16:04 +0000)
svn path=/trunk/; revision=17370

reactos/subsys/system/winefile/Makefile.MinGW [new file with mode: 0644]
reactos/subsys/system/winefile/make_winefile.dsp

diff --git a/reactos/subsys/system/winefile/Makefile.MinGW b/reactos/subsys/system/winefile/Makefile.MinGW
new file mode 100644 (file)
index 0000000..a26a5f1
--- /dev/null
@@ -0,0 +1,56 @@
+#
+#  Winefile Makefile for MinGW
+#
+
+CC = gcc
+LD = gcc
+
+CFLAGS = -DUNICODE -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
+RCFLAGS        = -D__WINDRES__
+LFLAGS = -Wl,--subsystem,windows
+
+ifdef DEBUG
+CFLAGS += -D_DEBUG -g
+RCFLAGS        += -D_DEBUG
+LFLAGS += -g
+else
+CFLAGS += -DNDEBUG -Os
+RCFLAGS        += -DNDEBUG
+LFLAGS += -s
+endif
+
+ifndef UNICODE
+UNICODE = 1
+endif
+
+ifeq ($(UNICODE),1)
+CFLAGS += -DUNICODE
+# LFLAGS+= -Wl,--entry,_wWinMain@16
+RCFLAGS += -DUNICODE
+endif
+
+CXXFLAGS = $(CFLAGS)
+
+EXEC_SUFFIX = .exe
+RES_SUFFIX = .coff
+
+PROGRAM = winefile
+
+OBJECTS = winefile.o
+
+LIBS = uuid user32 gdi32 advapi32 comctl32 shell32 comdlg32 ole32 version mpr
+
+DELAYIMPORTS = 
+
+TARGET = $(PROGRAM)$(EXEC_SUFFIX)
+
+all: $(TARGET)
+
+$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX)
+       $(LD) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS))
+
+$(PROGRAM)$(RES_SUFFIX): $(PROGRAM).rc *.bmp *.ico
+       windres $(RCFLAGS) -o $@ $(PROGRAM).rc
+
+clean:
+       rm -f $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX)
index 3e25a37..c03b772 100644 (file)
@@ -41,7 +41,7 @@ CFG=make_winefile - Win32 Debug
 # PROP Use_Debug_Libraries 0\r
 # PROP Output_Dir "Release"\r
 # PROP Intermediate_Dir "Release"\r
-# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make"\r
+# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW"\r
 # PROP Rebuild_Opt "clean all"\r
 # PROP Target_File "winefile.exe"\r
 # PROP Bsc_Name ""\r
@@ -62,7 +62,7 @@ CFG=make_winefile - Win32 Debug
 # PROP Use_Debug_Libraries 1\r
 # PROP Output_Dir "Debug"\r
 # PROP Intermediate_Dir "Debug"\r
-# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make DEBUG=1"\r
+# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW DEBUG=1"\r
 # PROP Rebuild_Opt "clean all"\r
 # PROP Target_File "winefile.exe"\r
 # PROP Bsc_Name ""\r
@@ -83,7 +83,7 @@ CFG=make_winefile - Win32 Debug
 \r
 # Begin Source File\r
 \r
-SOURCE=.\makefile\r
+SOURCE=.\Makefile.MinGW\r
 # End Source File\r
 # End Target\r
 # End Project\r