Browse Source

Better makefile order and gitignore

master
Ludovic 'Archivist' Lagouardette 4 years ago
parent
commit
8703bde308
2 changed files with 31 additions and 24 deletions
  1. +4
    -0
      .gitignore
  2. +27
    -24
      Makefile

+ 4
- 0
.gitignore View File

@ -0,0 +1,4 @@
.deps/*
src_deps/*
include_deps/*
build/*

+ 27
- 24
Makefile View File

@ -30,6 +30,33 @@ DEPS := .deps/spdlog \
.deps/spdlog_sqlite \ .deps/spdlog_sqlite \
.deps/sqlite3 \ .deps/sqlite3 \
.deps/jinx .deps/jinx
#####################
# COMPILATION MODES #
#####################
all:
+make deps
+make executable
debug:
+make deps
+make debug_executable
release:
+make deps
+make release_executable
executable: deps
executable: build $(APP_DIR)/$(TARGET)
debug_executable: CFLAGS += -DDEBUG -g
debug_executable: CXXFLAGS += -DDEBUG -g
debug_executable: build $(APP_DIR)/$(TARGET)
gdb $(APP_DIR)/$(TARGET)
release_executable: CFLAGS += -O3 -march=native
release_executable: CXXFLAGS += -O3 -march=native
release_executable: build $(APP_DIR)/$(TARGET)
############################# #############################
# DEPENDENCIES DECLARATIONS # # DEPENDENCIES DECLARATIONS #
@ -93,30 +120,6 @@ $(DEPS_DIR)/libspdlog.a:
# PROJECT COMPILATION # # PROJECT COMPILATION #
####################### #######################
all:
+make deps
+make executable
debug:
+make deps
+make debug_executable
release:
+make deps
+make release_executable
executable: deps
executable: build $(APP_DIR)/$(TARGET)
debug_executable: CFLAGS += -DDEBUG -g
debug_executable: CXXFLAGS += -DDEBUG -g
debug_executable: build $(APP_DIR)/$(TARGET)
gdb $(APP_DIR)/$(TARGET)
release_executable: CFLAGS += -O3 -march=native
release_executable: CXXFLAGS += -O3 -march=native
release_executable: build $(APP_DIR)/$(TARGET)
$(OBJ_DIR)/%.cpp.o: %.cpp $(OBJ_DIR)/%.cpp.o: %.cpp
@mkdir -p $(@D) @mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $< -o $@ $(LDFLAGS) $(CXX) $(CXXFLAGS) $(INCLUDE) -c $< -o $@ $(LDFLAGS)

Loading…
Cancel
Save