Moved some common/* files into directories

This commit is contained in:
Kayne Ruse
2013-10-27 20:17:37 +11:00
parent 43852ce755
commit 26eba2def6
28 changed files with 94 additions and 74 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
#config #config
COMMONDIR+=../common ../common/mapsystem COMMONDIR+=../common ../common/map ../common/network ../common/ui
COMMON+=../libcommon.a COMMON+=../libcommon.a
LIB+=$(COMMON) -lmingw32 -lSDLmain -lSDL -llua -lsqlite3 LIB+=$(COMMON) -lmingw32 -lSDLmain -lSDL -llua -lsqlite3
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR)) CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR))
+3 -1
View File
@@ -19,7 +19,9 @@ OUT=$(addprefix $(OUTDIR)/,libcommon.a)
#targets #targets
all: $(OBJ) $(OUT) all: $(OBJ) $(OUT)
ar -crs $(OUT) $(OBJ) ar -crs $(OUT) $(OBJ)
$(MAKE) -C mapsystem $(MAKE) -C map
$(MAKE) -C network
$(MAKE) -C ui
$(OBJ): | $(OBJDIR) $(OBJ): | $(OBJDIR)
-35
View File
@@ -1,35 +0,0 @@
/* Copyright: (c) Kayne Ruse 2013
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#include "map_loader.hpp"
#include "utility.hpp"
#include <fstream>
#include <stdexcept>
void loadGameMap(std::string mapPathName, RegionPager* const, TileSheetManager* const) {
//
}
void saveGameMap(std::string mapPathName, RegionPager* const, TileSheetManager* const) {
//
}
-35
View File
@@ -1,35 +0,0 @@
/* Copyright: (c) Kayne Ruse 2013
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef MAPLOADER_HPP_
#define MAPLOADER_HPP_
#include "region_pager.hpp"
#include "tile_sheet_manager.hpp"
#include <string>
/* Given the map name and pointers to containers, this is a generic loading system
*/
void loadGameMap(std::string mapPathName, RegionPager* const, TileSheetManager* const);
void saveGameMap(std::string mapPathName, RegionPager* const, TileSheetManager* const);
#endif
+44
View File
@@ -0,0 +1,44 @@
#config
COMMONDIR+=..
COMMON+=../../libcommon.a
LIB+=
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR))
CFLAGS+=-DDEBUG $(addprefix -I,$(COMMONDIR))
#source
CXXSRC=$(wildcard *.cpp)
CSRC=$(wildcard *.c)
#objects
OBJDIR=obj
OBJ+=$(addprefix $(OBJDIR)/,$(CXXSRC:.cpp=.o))
OBJ+=$(addprefix $(OBJDIR)/,$(CSRC:.c=.o))
#output
OUTDIR=../..
OUT=$(addprefix $(OUTDIR)/,libcommon.a)
#targets
all: $(OBJ) $(OUT)
ar -crs $(OUT) $(OBJ)
$(OBJ): | $(OBJDIR)
$(OUT): | $(OUTDIR)
$(OBJDIR):
mkdir $(OBJDIR)
$(OUTDIR):
mkdir $(OUTDIR)
$(OBJDIR)/%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
clean:
$(RM) *.o *.a *.exe
rebuild: clean all
+44
View File
@@ -0,0 +1,44 @@
#config
COMMONDIR+=..
COMMON+=../../libcommon.a
LIB+=
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR))
CFLAGS+=-DDEBUG $(addprefix -I,$(COMMONDIR))
#source
CXXSRC=$(wildcard *.cpp)
CSRC=$(wildcard *.c)
#objects
OBJDIR=obj
OBJ+=$(addprefix $(OBJDIR)/,$(CXXSRC:.cpp=.o))
OBJ+=$(addprefix $(OBJDIR)/,$(CSRC:.c=.o))
#output
OUTDIR=../..
OUT=$(addprefix $(OUTDIR)/,libcommon.a)
#targets
all: $(OBJ) $(OUT)
ar -crs $(OUT) $(OBJ)
$(OBJ): | $(OBJDIR)
$(OUT): | $(OUTDIR)
$(OBJDIR):
mkdir $(OBJDIR)
$(OUTDIR):
mkdir $(OUTDIR)
$(OBJDIR)/%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
clean:
$(RM) *.o *.a *.exe
rebuild: clean all
+1 -1
View File
@@ -1,5 +1,5 @@
#config #config
COMMONDIR+=../common ../common/mapsystem COMMONDIR+=../common ../common/map ../common/network ../common/ui
COMMON+=../libcommon.a COMMON+=../libcommon.a
LIB+=$(COMMON) -lmingw32 -lSDLmain -lSDL -llua -lsqlite3 LIB+=$(COMMON) -lmingw32 -lSDLmain -lSDL -llua -lsqlite3
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR)) CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR))
+1 -1
View File
@@ -1,5 +1,5 @@
#config #config
COMMONDIR+=../common ../common/mapsystem COMMONDIR+=../common ../common/map ../common/network ../common/ui
COMMON+=../libcommon.a COMMON+=../libcommon.a
LIB+=$(COMMON) -lSDL_net -lwsock32 -liphlpapi -lmingw32 -lSDLmain -lSDL -llua -lsqlite3 LIB+=$(COMMON) -lSDL_net -lwsock32 -liphlpapi -lmingw32 -lSDLmain -lSDL -llua -lsqlite3
CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR)) CXXFLAGS+=-std=c++11 -DDEBUG $(addprefix -I,$(COMMONDIR))