From 67c2d76ed9d628f474add6e230a80b539f21a023 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sat, 4 Feb 2023 22:16:23 -0500 Subject: [PATCH] Makefile: update to use jsoncpp object for faster compilation --- CourseOfferingsScraper.cpp | 2 +- Makefile | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CourseOfferingsScraper.cpp b/CourseOfferingsScraper.cpp index 43f74b9..b17c3b0 100644 --- a/CourseOfferingsScraper.cpp +++ b/CourseOfferingsScraper.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include namespace fs = std::filesystem; struct quatalog_data_t { diff --git a/Makefile b/Makefile index 17dbaa8..bd2944a 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ CXX = clang++ -CXXFLAGS = -O2 -march=native -I 3rdparty/jsoncpp -Wall -std=c++17 +CXXFLAGS = -O2 -march=native -Wall -std=c++17 -CourseOfferingsScraper: CourseOfferingsScraper.cpp +CourseOfferingsScraper: CourseOfferingsScraper.cpp json.o -%.o: %.cpp %.hpp - $(CXX) $(CXXFLAGS) -o $@ +json.o: 3rdparty/jsoncpp/dist/jsoncpp.cpp + $(CXX) -c $(CXXFLAGS) $? -o $@ -jsoncpp/3rdparty/dist: +3rdparty/jsoncpp/dist/jsoncpp.cpp: git submodule update --init cd 3rdparty/jsoncpp; ./amalgamate.py + +%.o: %.cpp %.hpp + $(CXX) $(CXXFLAGS) $? -o $@