CXXFLAGS := -U__GTHREADS -MMD -Wall -Werror -std=c++11
LDFLAGS := -lasound -lX11 -lpthread
DZEN2 ?= dzen2
PROJECT_NAME := $(notdir $(abspath ..))
SOURCE_FILES := $(wildcard *.cpp)
OBJECT_FILES := $(SOURCE_FILES:.cpp=.o)
.PHONY: release debug run clean
release: CXXFLAGS += -O3
release: LDFLAGS += -Wl,--strip-all
release: $(PROJECT_NAME)
debug: CXXFLAGS += -O0 -g
debug: CXXFLAGS += -D_GLIBCXX_DEBUG
debug: LDFLAGS += -O0 -g
debug: $(PROJECT_NAME)
$(PROJECT_NAME): $(OBJECT_FILES)
g++ $(LDFLAGS) $(OBJECT_FILES) -o $@
run: $(PROJECT_NAME)
./$^ | $(DZEN2) -ta l -h 17 -fn -*-inconsolata-bold-*-*--13-*-*-*-*-*-*-*
.cpp.o:
g++ -c $(CXXFLAGS) -o $@ $<
clean:
-$(RM) *.o *.d
-$(RM) $(PROJECT_NAME)
include $(wildcard *.d)
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/d2if
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/d2if
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master