aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2021-05-27 19:07:57 -0400
committerJon Santmyer <jon@jonsantmyer.com>2021-05-27 19:07:57 -0400
commitd3602d5cccf7f6c4a7f975694db2b16db28cdd60 (patch)
tree8640f324adea00102d039378c3a46bb9331cf266 /Makefile
downloadpostmodern-d3602d5cccf7f6c4a7f975694db2b16db28cdd60.tar.gz
postmodern-d3602d5cccf7f6c4a7f975694db2b16db28cdd60.tar.bz2
postmodern-d3602d5cccf7f6c4a7f975694db2b16db28cdd60.zip
working screens / windows system. title screen and escape menu
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile59
1 files changed, 59 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f4825bd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,59 @@
+TRUECOLOR := 1
+EXTCOLOR := 0
+VGACOLOR := 0
+
+PWD := $(shell pwd)
+
+SRCDIR := $(PWD)/src
+INCDIR := $(PWD)/include
+SRCFILES := $(wildcard $(SRCDIR)/*.cpp)
+
+OBJFILES := $(patsubst %.cpp,%.o,$(SRCFILES))
+
+TARGET_NAME := postmodern
+TARGET_PREFIX := $(PWD)/bin
+TARGET := $(TARGET_PREFIX)/$(TARGET_NAME)
+
+WARNINGS := -Wall \
+ -Wextra \
+ -Wformat-signedness \
+ -Wlogical-op \
+ -Wmissing-declarations \
+ -Wmissing-noreturn \
+ -Wnon-virtual-dtor \
+ -Wold-style-cast \
+ -Woverloaded-virtual \
+ -Wpedantic \
+ -Wsuggest-override \
+ -Wunused-macros \
+ -Wzero-as-null-pointer-constant
+
+CPP := g++
+CPPFLAGS := -std=gnu++20 $(WARNINGS) -I$(INCDIR) -g
+LIBS :=
+
+ifeq ($(TRUECOLOR), 1)
+ CPPFLAGS += -DTRUECOLOR
+else ifeq ($(EXTCOLOR), 1)
+ CPPFLAGS += -DEXTCOLOR
+else ifeq ($(VGACOLOR), 1)
+ CPPFLAGS += -DVGACOLOR
+else
+ CPPFLAGS += -DNOCOLOR
+endif
+
+.PHONY: all
+all: $(OBJFILES)
+ $(CPP) $(CPPFLAGS) $(LIBS) $(OBJFILES) -o $(TARGET)
+
+run:
+ cd $(TARGET_PREFIX); ./$(TARGET_NAME)
+
+clean:
+ rm $(OBJFILES)
+ rm $(TARGET)
+
+%.o:%.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# vim: set ts=4 sw=0 tw=0 noet :