swg/Makefile

62 lines
2.5 KiB
Makefile
Raw Permalink Normal View History

2022-02-25 01:40:14 +00:00
# Copyright (C) 2022 luca0N!
#
# This file is part of Static Website Generator (swg).
#
# Static Website Generator (swg) is free software: you can redistribute it
# and/or modify it under the terms of the version 3 of the GNU Lesser General
# Public License as published by the Free Software Foundation.
#
# Static Website Generator (swg) is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Static Website Generator (swg). If not, see
# <https://www.gnu.org/licenses/>.
#
# Contact luca0N! by e-mail: <luca0n [at] luca0n [dot] com>.
PROGRAM_NAME=swg
CXXC=g++
CXXFLAGS=-Wall -Wextra -g -O0 -std=c++17
.PHONY: clean
$(PROGRAM_NAME): build/ build/obj/ build/obj/main.o build/obj/ConfigUtils.o build/obj/WebsiteBuilder.o build/obj/SwgRuntime.o build/obj/MarkdownParser.o build/obj/Article.o build/obj/Common.o build/obj/BlogBuilder.o
$(CXXC) -o $(PROGRAM_NAME) build/obj/main.o build/obj/ConfigUtils.o build/obj/WebsiteBuilder.o build/obj/SwgRuntime.o build/obj/MarkdownParser.o build/obj/Article.o build/obj/Common.o build/obj/BlogBuilder.o
2022-02-25 01:40:14 +00:00
build/obj/main.o: src/main.cxx src/ConfigUtils.hxx src/SwgContext.hxx src/WebsiteBuilder.hxx src/Common.hxx
$(CXXC) $(CXXFLAGS) -o build/obj/main.o -c src/main.cxx
build/obj/ConfigUtils.o: src/ConfigUtils.cxx src/SwgContext.hxx src/Common.hxx
$(CXXC) $(CXXFLAGS) -o build/obj/ConfigUtils.o -c src/ConfigUtils.cxx
build/obj/WebsiteBuilder.o: src/WebsiteBuilder.hxx src/WebsiteBuilder.cxx src/SwgRuntime.hxx src/Common.hxx src/MarkdownParser.hxx src/Article.hxx
2022-02-25 01:40:14 +00:00
$(CXXC) $(CXXFLAGS) -o build/obj/WebsiteBuilder.o -c src/WebsiteBuilder.cxx
build/obj/SwgRuntime.o: src/SwgRuntime.hxx src/SwgRuntime.cxx
$(CXXC) $(CXXFLAGS) -o build/obj/SwgRuntime.o -c src/SwgRuntime.cxx
build/obj/MarkdownParser.o: src/MarkdownParser.hxx src/MarkdownParser.cxx
$(CXXC) $(CXXFLAGS) -o build/obj/MarkdownParser.o -c src/MarkdownParser.cxx
build/obj/Article.o: src/Article.hxx src/Article.cxx
$(CXXC) $(CXXFLAGS) -o build/obj/Article.o -c src/Article.cxx
build/obj/Common.o: src/Common.hxx src/Common.cxx
$(CXXC) $(CXXFLAGS) -o build/obj/Common.o -c src/Common.cxx
build/obj/BlogBuilder.o: src/BlogBuilder.hxx src/BlogBuilder.cxx
$(CXXC) $(CXXFLAGS) -o build/obj/BlogBuilder.o -c src/BlogBuilder.cxx
2022-02-25 01:40:14 +00:00
build/:
mkdir -p build/
build/obj/:
mkdir -p build/obj/
clean:
rm -rfv build/ $(PROGRAM_NAME)