5 changed files with 59 additions and 123 deletions
@ -1,4 +0,0 @@
|
||||
PKWARE_OBJS=3rdParty/PKWare/explode.o \
|
||||
3rdParty/PKWare/implode.o
|
||||
|
||||
-include *.d |
||||
@ -1,46 +1,49 @@
|
||||
# For 32-bit build systems, the executable is just mingw32
|
||||
MINGW32 ?= i686-w64-mingw32
|
||||
# Used s.t. we can try to use clang to compile code
|
||||
_CXX ?= g++
|
||||
|
||||
CXX=$(MINGW32)-$(_CXX)
|
||||
ifeq ($(MINGW32), "mingw32") |
||||
DLLTOOL=dlltool
|
||||
else |
||||
DLLTOOL=$(MINGW32)-dlltool
|
||||
endif |
||||
|
||||
# Clang doesn't understand permissive compilation, we need to "fix" invalid
|
||||
# casts from a pointer type there using
|
||||
# static_cast<NEW_TYPE>(reinterpret_cast<uintptr_t>(ptr))
|
||||
# instead of
|
||||
# (NEW_TYPE)(ptr)
|
||||
CXXFLAGS=-std=c++98 -fpermissive -Wno-write-strings
|
||||
CPPFLAGS=-MMD -MF $*.d
|
||||
LDLIBS=-lgdi32 -lversion -ldiabloui -lstorm
|
||||
LDFLAGS=-L./
|
||||
|
||||
all: devilution.exe |
||||
|
||||
include 3rdParty/PKWare/objs.mak |
||||
include Source/objs.mak |
||||
|
||||
devilution.exe: $(OBJS) $(PKWARE_OBJS) diabloui.lib storm.lib |
||||
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
diabloui.lib: diabloui.dll DiabloUI/diabloui_gcc.def |
||||
$(DLLTOOL) -d DiabloUI/diabloui_gcc.def -D $< -l $@
|
||||
|
||||
diabloui.dll: |
||||
$(error Please copy diabloui.dll (version 1.09b) here)
|
||||
|
||||
storm.lib: storm.dll 3rdParty/Storm/Source/storm_gcc.def |
||||
$(DLLTOOL) -d 3rdParty/Storm/Source/storm_gcc.def -D $< -l $@
|
||||
|
||||
storm.dll: |
||||
$(error Please copy storm.dll (version 1.09b) here)
|
||||
|
||||
clean: |
||||
@$(RM) -v $(OBJS) $(OBJS:.o=.d) $(PKWARE_OBJS) $(PKWARE_OBJS:.o=d) storm.lib diabloui.lib
|
||||
|
||||
.PHONY: clean all |
||||
# mingw32 and mingw64 have different executables
|
||||
ifdef MINGW32 |
||||
CXX=mingw32-g++
|
||||
DLLTOOL=dlltool
|
||||
else |
||||
CXX=i686-w64-mingw32-g++
|
||||
DLLTOOL=i686-w64-mingw32-dlltool
|
||||
endif |
||||
|
||||
# Clang doesn't understand permissive compilation, we need to "fix" invalid
|
||||
# casts from a pointer type there using
|
||||
# static_cast<NEW_TYPE>(reinterpret_cast<uintptr_t>(ptr))
|
||||
# instead of
|
||||
# (NEW_TYPE)(ptr)
|
||||
CXXFLAGS=-fpermissive -Wno-write-strings
|
||||
CPPFLAGS=-MMD -MF $*.d
|
||||
LDLIBS=-lgdi32 -lversion -ldiabloui -lstorm
|
||||
LDFLAGS=-L./ -static-libgcc -mwindows
|
||||
|
||||
all: devilution.exe |
||||
|
||||
DIABLO_SRC=$(wildcard Source/*.cpp)
|
||||
OBJS=$(DIABLO_SRC:.cpp=.o)
|
||||
|
||||
PKWARE_SRC=$(wildcard 3rdParty/PKWare/*.cpp)
|
||||
PKWARE_OBJS=$(PKWARE_SRC:.cpp=.o)
|
||||
|
||||
devilution.exe: $(OBJS) $(PKWARE_OBJS) diabres.o diabloui.lib storm.lib |
||||
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
diabres.o: Diablo.rc |
||||
windres $< $@
|
||||
|
||||
diabloui.lib: diabloui.dll DiabloUI/diabloui_gcc.def |
||||
$(DLLTOOL) -d DiabloUI/diabloui_gcc.def -D $< -l $@
|
||||
|
||||
diabloui.dll: |
||||
# $(error Please copy diabloui.dll (version 1.09[b]) here)
|
||||
|
||||
storm.lib: storm.dll 3rdParty/Storm/Source/storm_gcc.def |
||||
$(DLLTOOL) -d 3rdParty/Storm/Source/storm_gcc.def -D $< -l $@
|
||||
|
||||
storm.dll: |
||||
# $(error Please copy storm.dll (version 1.09[b]) here)
|
||||
|
||||
clean: |
||||
@$(RM) -v $(OBJS) $(OBJS:.o=.d) $(PKWARE_OBJS) $(PKWARE_OBJS:.o=d) diabres.o storm.lib diabloui.lib
|
||||
|
||||
.PHONY: clean all |
||||
|
||||
@ -1,70 +0,0 @@
|
||||
OBJS=Source/path.o \
|
||||
Source/monster.o \
|
||||
Source/engine.o \
|
||||
Source/world.o \
|
||||
Source/help.o \
|
||||
Source/interfac.o \
|
||||
Source/effects.o \
|
||||
Source/towners.o \
|
||||
Source/gendung.o \
|
||||
Source/sound.o \
|
||||
Source/sha.o \
|
||||
Source/dead.o \
|
||||
Source/multi.o \
|
||||
Source/items.o \
|
||||
Source/drlg_l2.o \
|
||||
Source/codec.o \
|
||||
Source/pfile.o \
|
||||
Source/drlg_l4.o \
|
||||
Source/gamemenu.o \
|
||||
Source/appfat.o \
|
||||
Source/error.o \
|
||||
Source/restrict.o \
|
||||
Source/player.o \
|
||||
Source/capture.o \
|
||||
Source/mpqapi.o \
|
||||
Source/nthread.o \
|
||||
Source/setmaps.o \
|
||||
Source/trigs.o \
|
||||
Source/diablo.o \
|
||||
Source/dx.o \
|
||||
Source/portal.o \
|
||||
Source/msgcmd.o \
|
||||
Source/plrmsg.o \
|
||||
Source/themes.o \
|
||||
Source/control.o \
|
||||
Source/doom.o \
|
||||
Source/init.o \
|
||||
Source/cursor.o \
|
||||
Source/debug.o \
|
||||
Source/pack.o \
|
||||
Source/stores.o \
|
||||
Source/msg.o \
|
||||
Source/loadsave.o \
|
||||
Source/objects.o \
|
||||
Source/palette.o \
|
||||
Source/quests.o \
|
||||
Source/wave.o \
|
||||
Source/tmsg.o \
|
||||
Source/minitext.o \
|
||||
Source/scrollrt.o \
|
||||
Source/sync.o \
|
||||
Source/missiles.o \
|
||||
Source/gmenu.o \
|
||||
Source/town.o \
|
||||
Source/dthread.o \
|
||||
Source/logging.o \
|
||||
Source/textdat.o \
|
||||
Source/lighting.o \
|
||||
Source/automap.o \
|
||||
Source/inv.o \
|
||||
Source/drlg_l1.o \
|
||||
Source/spells.o \
|
||||
Source/encrypt.o \
|
||||
Source/fault.o \
|
||||
Source/track.o \
|
||||
Source/movie.o \
|
||||
Source/drlg_l3.o \
|
||||
Source/mainmenu.o
|
||||
|
||||
-include *.d |
||||
Loading…
Reference in new issue