Makefile: update to use jsoncpp object for faster compilation

This commit is contained in:
Phantop 2023-02-04 22:16:23 -05:00
parent e01121a9af
commit 67c2d76ed9
2 changed files with 9 additions and 6 deletions

View file

@ -4,7 +4,7 @@
#include<iostream>
#include<filesystem>
#include<unordered_set>
#include<dist/jsoncpp.cpp>
#include<json/json.h>
namespace fs = std::filesystem;
struct quatalog_data_t {

View file

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