mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 13:52:30 +00:00
57 lines
966 B
Text
57 lines
966 B
Text
|
#
|
||
|
# Winefile Makefile for MinGW
|
||
|
#
|
||
|
|
||
|
CC = gcc
|
||
|
LD = gcc
|
||
|
|
||
|
CFLAGS = -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)
|