mirror of
https://github.com/scummvm/scummex.git
synced 2026-05-21 05:40:51 +00:00
84 lines
2.1 KiB
Makefile
84 lines
2.1 KiB
Makefile
# Where is scummvm will be installed
|
|
SCUMMEXPATH=C:/scummex
|
|
SRC=.
|
|
|
|
### Modify these paths
|
|
SDL_CFLAGS=-I$(SRC)/sdl/include
|
|
SDL_LIBS=-L$(SRC)/sdl/lib -lSDLmain -lSDL
|
|
|
|
WX_CFLAGS= -I/usr/local/include `wxmsw-2.4-config --cxxflags`
|
|
WX_LIBS=`wxmsw-2.4-config --libs`
|
|
|
|
CXX := c++
|
|
AR := ar cru
|
|
RANLIB := ranlib
|
|
MKDIR := mkdir -p
|
|
ECHO := echo -n
|
|
CAT := cat
|
|
RM := rm -f
|
|
RM_REC := $(RM) -r
|
|
ZIP := zip -q
|
|
CP := cp
|
|
|
|
OBJS := bomp.o codec37.o codec47.o descumm.o descumm6.o file.o image.o resource.o resources.o scaler.o scummex.o \
|
|
util.o wxwindows.o
|
|
CXXFLAGS := -g -O -Wall -Wuninitialized -Wstrict-prototypes -Wno-unused-variable -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
|
|
CXXFLAGS += $(SDL_CFLAGS) $(WX_CFLAGS)
|
|
LIBS := $(SDL_LIBS) $(WX_LIBS) -lmingw32
|
|
INCLUDES := -I.
|
|
CXXFLAGS += $(INCLUDES)
|
|
|
|
MODULE_DIRS :=
|
|
MODULES := sound
|
|
|
|
# Default build rule
|
|
all: scummex
|
|
|
|
-include $(addsuffix /module.mk,$(MODULES))
|
|
|
|
# The name for the directory used for depenency tracking
|
|
DEPDIR := .deps
|
|
DEPDIRS := $(addsuffix /$(DEPDIR),$(MODULE_DIRS))
|
|
|
|
# Main executable build rule
|
|
scummex: ${OBJS}
|
|
$(CXX) $+ ${LIBS} -o $@
|
|
|
|
resources.o:
|
|
windres --include-dir /usr/local/include image.rc $@
|
|
|
|
clean:
|
|
rm -f scummex $(OBJS)
|
|
|
|
distclean: clean
|
|
$(RM_REC) $(DEPDIRS)
|
|
|
|
.PHONY: all clean distclean mac
|
|
.SUFFIXES: .o .cpp
|
|
|
|
|
|
# C++ build rule with dependency tracking (requires GCC)
|
|
.cpp.o:
|
|
$(MKDIR) $(*D)/$(DEPDIR)
|
|
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
|
$(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
|
|
$(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
|
|
$(RM) "$(*D)/$(DEPDIR)/$(*F).d2"
|
|
|
|
# Include the dependency tracking files. We add /dev/null at the end
|
|
# of the list to avoid a warning/error if no .d file exist
|
|
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS))) /dev/null
|
|
|
|
# Some additional targets
|
|
install: all
|
|
mkdir -p $(SCUMMEXPATH)
|
|
mkdir -p $(SCUMMEXPATH)/help
|
|
strip scummex.exe -o $(SCUMMEXPATH)/scummex.exe
|
|
|
|
dist: install
|
|
cp COPYING $(SCUMMEXPATH)/copying.txt
|
|
cp README $(SCUMMEXPATH)/readme.txt
|
|
cp help/*.html $(SCUMMEXPATH)/help
|
|
cp help/help.* $(SCUMMEXPATH)/help
|
|
cp SDL/lib/SDL.dll $(SCUMMEXPATH)
|