mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-20 00:25:20 +01:00
changes to handing of digging (non backwards-compatible i guess)
This commit is contained in:
60
Makefile
60
Makefile
@@ -1,11 +1,12 @@
|
||||
# Makefile for Irrlicht Examples
|
||||
# It's usually sufficient to change just the target name and source file list
|
||||
# and be sure that CXX is set to a valid compiler
|
||||
TARGET = test
|
||||
SOURCE_FILES = guiTextInputMenu.cpp guiInventoryMenu.cpp irrlichtwrapper.cpp guiPauseMenu.cpp defaultsettings.cpp mapnode.cpp tile.cpp voxel.cpp mapblockobject.cpp inventory.cpp debug.cpp serialization.cpp light.cpp filesys.cpp connection.cpp environment.cpp client.cpp server.cpp socket.cpp mapblock.cpp mapsector.cpp heightmap.cpp map.cpp player.cpp utility.cpp main.cpp test.cpp
|
||||
SOURCES = $(addprefix src/, $(SOURCE_FILES))
|
||||
BUILD_DIR = build
|
||||
OBJECTS = $(addprefix $(BUILD_DIR)/, $(SOURCE_FILES:.cpp=.o))
|
||||
|
||||
DEBUG_TARGET = debugtest
|
||||
DEBUG_SOURCES = $(addprefix src/, $(SOURCE_FILES))
|
||||
DEBUG_BUILD_DIR = debugbuild
|
||||
DEBUG_OBJECTS = $(addprefix $(DEBUG_BUILD_DIR)/, $(SOURCE_FILES:.cpp=.o))
|
||||
|
||||
FAST_TARGET = fasttest
|
||||
FAST_SOURCES = $(addprefix src/, $(SOURCE_FILES))
|
||||
@@ -24,48 +25,49 @@ JTHREADPATH = ../jthread/jthread-1.2.1
|
||||
#CXXFLAGS = -O2 -ffast-math -Wall -fomit-frame-pointer -pipe
|
||||
#CXXFLAGS = -O2 -ffast-math -Wall -g -pipe
|
||||
#CXXFLAGS = -O1 -ffast-math -Wall -g
|
||||
CXXFLAGS = -Wall -g -O0
|
||||
CXXFLAGS = -Wall -g -O1
|
||||
|
||||
all: fast_linux
|
||||
all: fast
|
||||
|
||||
ifeq ($(HOSTTYPE), x86_64)
|
||||
LIBSELECT=64
|
||||
endif
|
||||
|
||||
all_linux fast_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L$(IRRLICHTPATH)/lib/Linux -L$(JTHREADPATH)/src/.libs -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -ljthread -lz
|
||||
all_linux fast_linux: CPPFLAGS = -I$(IRRLICHTPATH)/include -I/usr/X11R6/include -I$(JTHREADPATH)/src
|
||||
fast_linux server_linux: CXXFLAGS = -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops -mtune=i686
|
||||
server_linux: LDFLAGS = -L$(JTHREADPATH)/src/.libs -ljthread -lz -lpthread
|
||||
server_linux: CPPFLAGS = -I$(IRRLICHTPATH)/include -I/usr/X11R6/include -I$(JTHREADPATH)/src -DSERVER
|
||||
all_linux fast_linux clean_linux: SYSTEM=Linux
|
||||
debug fast: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L$(IRRLICHTPATH)/lib/Linux -L$(JTHREADPATH)/src/.libs -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -ljthread -lz
|
||||
debug: CPPFLAGS = -I$(IRRLICHTPATH)/include -I/usr/X11R6/include -I$(JTHREADPATH)/src -DDEBUG
|
||||
fast: CPPFLAGS = -I$(IRRLICHTPATH)/include -I/usr/X11R6/include -I$(JTHREADPATH)/src -DUNITTEST_DISABLE
|
||||
fast server: CXXFLAGS = -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops -mtune=i686
|
||||
server: LDFLAGS = -L$(JTHREADPATH)/src/.libs -ljthread -lz -lpthread
|
||||
server: CPPFLAGS = -I$(IRRLICHTPATH)/include -I/usr/X11R6/include -I$(JTHREADPATH)/src -DSERVER -DUNITTEST_DISABLE
|
||||
debug fast clean_debug: SYSTEM=Linux
|
||||
|
||||
DESTPATH = bin/$(TARGET)
|
||||
DEBUG_DESTPATH = bin/$(DEBUG_TARGET)
|
||||
FAST_DESTPATH = bin/$(FAST_TARGET)
|
||||
SERVER_DESTPATH = bin/$(SERVER_TARGET)
|
||||
|
||||
# Build commands
|
||||
|
||||
all_linux: $(BUILD_DIR) $(DESTPATH)
|
||||
fast_linux: $(FAST_BUILD_DIR) $(FAST_DESTPATH)
|
||||
server_linux: $(SERVER_BUILD_DIR) $(SERVER_DESTPATH)
|
||||
debug: $(DEBUG_BUILD_DIR) $(DEBUG_DESTPATH)
|
||||
fast: $(FAST_BUILD_DIR) $(FAST_DESTPATH)
|
||||
server: $(SERVER_BUILD_DIR) $(SERVER_DESTPATH)
|
||||
|
||||
$(BUILD_DIR):
|
||||
mkdir -p $(BUILD_DIR)
|
||||
$(DEBUG_BUILD_DIR):
|
||||
mkdir -p $(DEBUG_BUILD_DIR)
|
||||
$(FAST_BUILD_DIR):
|
||||
mkdir -p $(FAST_BUILD_DIR)
|
||||
$(SERVER_BUILD_DIR):
|
||||
mkdir -p $(SERVER_BUILD_DIR)
|
||||
|
||||
$(DESTPATH): $(OBJECTS)
|
||||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
$(DEBUG_DESTPATH): $(DEBUG_OBJECTS)
|
||||
$(CXX) -o $@ $(DEBUG_OBJECTS) $(LDFLAGS)
|
||||
|
||||
$(FAST_DESTPATH): $(FAST_OBJECTS)
|
||||
$(CXX) -o $@ $(FAST_OBJECTS) $(LDFLAGS) -DUNITTEST_DISABLE
|
||||
$(CXX) -o $@ $(FAST_OBJECTS) $(LDFLAGS)
|
||||
|
||||
$(SERVER_DESTPATH): $(SERVER_OBJECTS)
|
||||
$(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) -DSERVER -DUNITTEST_DISABLE
|
||||
$(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS)
|
||||
|
||||
$(BUILD_DIR)/%.o: src/%.cpp
|
||||
$(DEBUG_BUILD_DIR)/%.o: src/%.cpp
|
||||
$(CXX) -c -o $@ $< $(CPPFLAGS) $(CXXFLAGS)
|
||||
|
||||
$(FAST_BUILD_DIR)/%.o: src/%.cpp
|
||||
@@ -74,15 +76,15 @@ $(FAST_BUILD_DIR)/%.o: src/%.cpp
|
||||
$(SERVER_BUILD_DIR)/%.o: src/%.cpp
|
||||
$(CXX) -c -o $@ $< $(CPPFLAGS) $(CXXFLAGS)
|
||||
|
||||
clean: clean_linux clean_fast_linux clean_server_linux
|
||||
clean: clean_debug clean_fast clean_server
|
||||
|
||||
clean_linux:
|
||||
@$(RM) $(OBJECTS) $(DESTPATH)
|
||||
clean_debug:
|
||||
@$(RM) $(DEBUG_OBJECTS) $(DEBUG_DESTPATH)
|
||||
|
||||
clean_fast_linux:
|
||||
clean_fast:
|
||||
@$(RM) $(FAST_OBJECTS) $(FAST_DESTPATH)
|
||||
|
||||
clean_server_linux:
|
||||
clean_server:
|
||||
@$(RM) $(SERVER_OBJECTS) $(SERVER_DESTPATH)
|
||||
|
||||
.PHONY: all all_win32 clean clean_linux clean_win32 clean_fast_linux clean_server_linux
|
||||
.PHONY: all all_win32 clean clean_debug clean_win32 clean_fast clean_server
|
||||
|
||||
Reference in New Issue
Block a user