From b455a469fe5ebd2427cfda6e09eefb528d06f738 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Sat, 16 Jan 2021 17:40:45 +0900 Subject: [PATCH] Init skeleton C++ project --- .gitignore | 4 ++++ Makefile | 21 +++++++++++++++++++++ src/main.cpp | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 src/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aaaed74 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/*.o +Dithering + +compile_commands.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c02c895 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ + +COMMON_FLAGS=-Wall -Wextra -Wpedantic +ifdef DEBUG + CPPFLAGS=${COMMON_FLAGS} -g -O0 +else + CPPFLAGS=${COMMON_FLAGS} -O3 -DNDEBUG +endif + +SOURCES=src/main.cpp +OBJECTS=${subst .cpp,.o,${SOURCES}} + +all: Dithering + +Dithering: ${OBJECTS} + ${CXX} ${CPPFLAGS} -o Dithering $^ + +.PHONY: + +clean: + rm -f Dithering + rm -f ${OBJECTS} diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..11b7fad --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +}