aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-04 10:46:00 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-04 10:46:00 +0100
commit1b1ab1afee7c059091e8182be5cf7f31da4d16b5 (patch)
tree4b57a918a50415799b1742ed7c09e2cb4ff6e2b0 /Makefile
parentbf5fa43b838cfea11e16a3339b10174ea28ea918 (diff)
Initial initial pre-alpha-alpha GUI code
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 009c5bc..1b7d53c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,23 @@
CXX = g++
-CXXFLAGS = -Wall -Wextra -std=c++11 -g -fwrapv
-TARGET = sim
+CXXFLAGS = -Wall -Wextra -std=c++11 -g -fwrapv -I$(FLTK)/include
+LDFLAGS = -L$(FLTK)/lib -lfltk
+TARGETS = sim gui
+
+FLTK = /usr/local/opt/fltk
.PHONY: all clean remake
-all: $(TARGET)
+all: $(TARGETS)
clean:
- rm -f $(TARGET) *.o
+ rm -f $(TARGETS) *.o
remake: clean
$(MAKE) all
-$(TARGET): $(patsubst %.cpp,%.o,$(wildcard *.cpp))
- $(CXX) -o $@ $^
+$(TARGETS): %: %.o $(filter-out $(addsuffix .o,$(TARGETS)),$(patsubst %.cpp,%.o,$(wildcard *.cpp)))
+ $(CXX) -o $@ $^ $(LDFLAGS)
%.o: %.cpp $(wildcard *.h)
$(CXX) $(CXXFLAGS) -c -o $@ $<