Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
111 lines (72 sloc) 2.33 KB
### Generated by Winemaker 0.7.4
SRCDIR = .
SUBDIRS =
DLLS =
EXES = wmahack.exe
### Common settings
CEXTRA = -mno-cygwin
CXXEXTRA = -mno-cygwin
RCEXTRA =
DEFINES =
INCLUDE_PATH =
DLL_PATH =
DLL_IMPORTS =
LIBRARY_PATH =
LIBRARIES = -lstdc++
### wmahack.exe sources and settings
wmahack_exe_MODULE = wmahack.exe
wmahack_exe_C_SRCS =
wmahack_exe_CXX_SRCS = wmahack.cc
wmahack_exe_RC_SRCS =
wmahack_exe_LDFLAGS = -mconsole \
-mno-cygwin
wmahack_exe_DLL_PATH =
wmahack_exe_DLLS = odbc32 \
ole32 \
oleaut32 \
winspool \
odbccp32
wmahack_exe_LIBRARY_PATH=
wmahack_exe_LIBRARIES= uuid
wmahack_exe_OBJS = $(wmahack_exe_C_SRCS:.c=.o) \
$(wmahack_exe_CXX_SRCS:.cpp=.o) \
$(wmahack_exe_RC_SRCS:.rc=.res)
### Global source lists
C_SRCS = $(wmahack_exe_C_SRCS)
CXX_SRCS = $(wmahack_exe_CXX_SRCS)
RC_SRCS = $(wmahack_exe_RC_SRCS)
### Tools
CC = winegcc
CXX = wineg++
RC = wrc
### Generic targets
all: $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)
### Build rules
.PHONY: all clean dummy
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
# Implicit rules
.SUFFIXES: .cpp .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
.c.o:
$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o $@ $<
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.rc.res:
$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<
# Rules for cleaning
CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
\\\#*\\\# *~ *% .\\\#*
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
$(RM) $(DLLS:%=%.so) $(EXES:%=%.so) $(EXES:%.exe=%)
$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean
$(EXTRASUBDIRS:%=%/__clean__): dummy
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
### Target specific build rules
DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH) $(DLL_IMPORTS:%=-l%)
$(wmahack_exe_MODULE).so: $(wmahack_exe_OBJS)
$(CC) $(wmahack_exe_LDFLAGS) -o $@ $(wmahack_exe_OBJS) $(wmahack_exe_LIBRARY_PATH) $(DEFLIB) $(wmahack_exe_DLLS:%=-l%) $(wmahack_exe_LIBRARIES:%=-l%)