Update makefile

dev
Shariq Shah 9 years ago
parent e43b3aa324
commit 0e8c68a44a
  1. 50
      build/linux/makefile
  2. 2
      orgfile.org

@ -1,19 +1,41 @@
PROJECT_NAME=Symmetry
CC=gcc
SRC_DIR=../../src
SRCS=$(patsubst $(SRC_DIR)/%.c, %.c, $(wildcard ../../src/*.c))
OBJS=$(patsubst %.c,%.o,$(SRCS))
CFLAGS= -o3 -Wall
LIBS=$(shell pkg-config --static --libs glfw3 glew)
PROJECT_NAME = Symmetry
CC = gcc
SRC_DIR = ../../src
INCLUDE_DIR = ../../include
LIB_DIR_RELEASE = ../../libs/release/linux64_gcc
LIB_DIR_DEBUG = ../../libs/debug/linux64_gcc
BUILD_TYPE = release
SRCS = $(patsubst $(SRC_DIR)/%.c, %.c, $(wildcard ../../src/*.c))
OBJS = $(patsubst %.c,%.o,$(SRCS))
OBJS_RELEASE = $(patsubst %.c,.release/%.o,$(SRCS))
OBJS_DEBUG = $(patsubst %.c,.debug/%.o,$(SRCS))
CFLAGS = -Wall -I$(INCLUDE_DIR) -DUSE_GLAD
CFLAGS_DEBUG = -g -DGL_DEBUG_CONTEXT -DAL_DEBUG -std=c99
CFLAGS_RELEASE = -O3
LFLAGS = -lSDL2 -lopenal -lGL -lsndio -lpthread -ldl -lm
all: $(OBJS)
echo $(SRCS)
echo $(OBJS)
$(CC) $(CFLAGS) -o $(PROJECT_NAME) $^ $(LIBS)
all: release
release: BUILD_TYPE = release
release: CFLAGS += $(CFLAGS_RELEASE)
release: pre_build $(OBJS) post_build
$(CC) $(OBJS_RELEASE) -L$(LIB_DIR_RELEASE) $(LFLAGS) -o $(PROJECT_NAME)
debug: BUILD_TYPE = debug
debug: CFLAGS += $(CFLAGS_DEBUG)
debug: pre_build $(OBJS) post_build
$(CC) $(OBJS_DEBUG) -L$(LIB_DIR_DEBUG) $(LFLAGS) -o $(PROJECT_NAME)
%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
$(CC) $(CFLAGS) -c $< -o .$(BUILD_TYPE)/$@
pre_build:
-@mkdir .debug .release
post_build:
-@ln -fs /mnt/Dev/Projects/symmetry/assets assets
clean:
rm $(PROJECT_NAME)
rm $(OBJS)
-rm -f $(PROJECT_NAME)
-rm -rf .release
-rm -rf .debug

@ -93,6 +93,7 @@ All the code in this repository is under GPLv3, see LICENSE for more information
- State "CANCELED" from "TODO" [2017-02-26 Sun 01:49] \\
Sticking with forward rendering for now and focusing on tools etc.
** TODO Fix mouse bugs on windows
** TODO Configuration/Settings load/save handling
** DONE Fix mousewheel bugs and gui not responding to mousewheel input
- State "DONE" from "TODO" [2017-03-19 Sun 01:31]
** TODO Ability to mark meshes for debug rendering with possibility of different color for each?
@ -108,6 +109,7 @@ x Font atlas proper cleanup
- Decoupled event handling of gui and input if possible
- Custom rendering for gui
** TODO Allow passsing base path as commandline argument?
** TODO Better handling incase assets folder is not found?
** DONE 3d sound using OpenAL
- State "DONE" from "TODO" [2017-03-23 Thu 01:43]
** TODO Ogg format loading and playback

Loading…
Cancel
Save