summaryrefslogtreecommitdiff
path: root/tools/nitrobanner/Makefile
diff options
context:
space:
mode:
authorAkira Akashi <rubenru09@aol.com>2021-08-22 12:31:00 +0100
committerGitHub <noreply@github.com>2021-08-22 12:31:00 +0100
commit28b66f4e9efc2dbde3005f3e5bcc44b93ae47796 (patch)
tree6078bb064621ff03fbcb8ddec952eb05730c8e8c /tools/nitrobanner/Makefile
parent97c8e77b2f951b6f0c43933576f21b833e7d5876 (diff)
parentd08722a7381c4c05a40ee59bb6de556616e1dfc2 (diff)
Merge branch 'master' into master
Diffstat (limited to 'tools/nitrobanner/Makefile')
-rw-r--r--tools/nitrobanner/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/nitrobanner/Makefile b/tools/nitrobanner/Makefile
new file mode 100644
index 00000000..322525bd
--- /dev/null
+++ b/tools/nitrobanner/Makefile
@@ -0,0 +1,30 @@
+CXXFLAGS := -std=c++17 -O3 -Wall -Wextra -Wpedantic
+
+ifeq ($(OS),Windows_NT)
+LDFLAGS += -lstdc++fs
+else
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Darwin)
+LDFLAGS += -lstdc++ -lc++ -lc /usr/local/opt/llvm@8/lib/libc++fs.a
+else
+LDFLAGS += -lstdc++fs
+endif
+endif
+
+OBJS = \
+ banner.o \
+ crc16.o \
+ main.o
+
+.PHONY: all clean
+
+all: nitrobanner
+
+%.o: %.cpp
+ $(CXX) -c -o $@ $< $(CXXFLAGS)
+
+clean:
+ $(RM) nitrobanner nitrobanner.exe *.o
+
+nitrobanner: $(OBJS)
+ $(CXX) -o $@ $^ $(LDFLAGS)