summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-23 17:00:14 +0100
committerNao Pross <naopross@thearcway.org>2019-01-23 17:00:14 +0100
commit92e2d9e3896d769ae187dac3bf2170efc7456169 (patch)
tree74bad549028a00e1fe864b6174eaf91d9f38b1bc
parentMake job hold RAII pointers that can expire, update test (diff)
downloadflatland-92e2d9e3896d769ae187dac3bf2170efc7456169.tar.gz
flatland-92e2d9e3896d769ae187dac3bf2170efc7456169.zip
Update .gitignore, delete makefile add -g flag to build
-rw-r--r--.gitignore2
-rw-r--r--makefile69
-rw-r--r--ninja/rules.ninja2
3 files changed, 2 insertions, 71 deletions
diff --git a/.gitignore b/.gitignore
index c3e0a43..a054592 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
# build files
-bin
+build
**/*.o
# ninja build files
diff --git a/makefile b/makefile
deleted file mode 100644
index 86f67a9..0000000
--- a/makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for symkit 1.0 by Raffaele Ancarola
-# C++ library for physics symulations
-
-NAME := flatland
-BIN := bin/lib$(NAME).so
-CC := g++
-CFLAGS := -Wall -std=c++17
-
-DIRS := engine
-BACKUP := backup
-INSTALL_DIR := /usr/lib
-
-INCLUDES := $(patsubst %,%/include,$(DIRS))
-
-# other required libraries
-LIBS := -lSDL2 #add libraries
-
-SRC := $(wildcard $(patsubst %,%/*.cpp,$(DIRS)))
-OBJ := $(patsubst %.cpp,bin/%.o,$(SRC))
-
-.PHONY: dirs clean install backup restore
-all: $(BIN)
-
-# builds all binaries into the shared library
-
-$(BIN): dirs $(OBJ)
- @printf "\nAssembling binaries\n\n"
- $(CC) $(CFLAGS) -shared -o $@ $(OBJ) -I $(INCLUDES) $(LIBS)
- @printf "\nCompilation successfully completed\n"
-
-# compile all sources
-
-$(OBJ): bin/%.o : %.cpp $(SRC)
- @printf "\nCompiling $<\n"
- $(CC) $(CFLAGS) -c $< -fPIC -o $@ -I $(INCLUDES) $(LIBS)
-
-# phony commands implementation
-
-# install the compiled library into your system
-# be careful with this command because it could not work
-install:
- chmod +x install.sh
- ./install.sh $(BIN) $(INSTALL_DIR)
-
-# generate all necessaries directories
-dirs:
- mkdir -p bin $(patsubst %,bin/%,$(DIRS))
- mkdir -p $(INCLUDES) $(BACKUP)
- @printf "Default directories created\n"
-
-# clean all binaries
-clean:
- rm -rfv bin/*
- @printf "Binary files cleaned\n"
-
-# backup the project in backup/symkit.zip
-backup:
- mkdir -p $(BACKUP)
- rm -rfv $(BACKUP)/*
- zip -r $(BACKUP)/symkit.zip $(DIRS)
- @printf "Backup completed\n"
-
-# restore the last backup, backup/symkit.zip must be present
-restore:
- unzip $(BACKUP)/symkit.zip -d $(BACKUP)
- rm -rfv $(DIRS)
- mv $(patsubst %,$(BACKUP)/%,$(DIRS)) .
- @printf "Backup restored\n"
-
diff --git a/ninja/rules.ninja b/ninja/rules.ninja
index 221e9ca..6674672 100644
--- a/ninja/rules.ninja
+++ b/ninja/rules.ninja
@@ -1,5 +1,5 @@
includes = -I lib/include -I engine/include
-cflags = -Wall -pedantic -fPIC -std=c++17 -DDEBUG $includes
+cflags = -g -Wall -pedantic -fPIC -std=c++17 -DDEBUG $includes
libs = -lSDL2 lib/libmm/build/libmm.a lib/libwsdl2/build/libwsdl2.a
lflags = $libs