Init skeleton C++ project

This commit is contained in:
Stephen Seo 2021-01-16 17:40:45 +09:00
parent 4d0a514a0b
commit b455a469fe
3 changed files with 28 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
src/*.o
Dithering
compile_commands.json

21
Makefile Normal file
View file

@ -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}

3
src/main.cpp Normal file
View file

@ -0,0 +1,3 @@
int main(int argc, char **argv) {
return 0;
}