aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 14220de..5778290 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,14 @@
CXX = g++
-CXXFLAGS = -Wall -Wextra -std=c++11 -fwrapv
+CXXFLAGS = -Wall -Wextra -std=c++0x -fwrapv
+LDFLAGS =
ifneq ($(DEBUG),)
CXXFLAGS += -g
else
CXXFLAGS += -O2
endif
+ifeq ($(shell uname),Linux)
+ LDFLAGS += -lbsd
+endif
BIN = main
.PHONY: all clean remake
@@ -18,7 +22,7 @@ remake: clean all
$(BIN): $(patsubst %.cpp,%.o,$(wildcard *.cpp))
- $(CXX) -o $@ $^
+ $(CXX) -o $@ $^ $(LDFLAGS)
%.o: %.cpp $(wildcard *.h)
$(CXX) $(CXXFLAGS) -c -o $@ $<