Merge pull request #2 from Phantop/main

Makefile: update to use jsoncpp object for faster compilation
This commit is contained in:
3eef8a28f26fb2bcc514e6f1938929a1f931762 2023-02-04 22:16:57 -05:00 committed by GitHub
commit 10d866be19
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 $@