2020-09-14 22:55:03 +00:00
|
|
|
CXX ?= g++
|
2020-09-15 14:05:16 +00:00
|
|
|
CFLAGS ?= -O2 -Wall -Wextra `pkg-config libxml-2.0 --cflags` `pkg-config libxml++-3.0 --cflags` -g
|
2020-09-14 22:55:03 +00:00
|
|
|
PREFIX ?= /usr/local/bin
|
2020-09-14 23:30:34 +00:00
|
|
|
LDFLAGS ?= -lcurl -lrestbed `pkg-config libxml-2.0 --libs` `pkg-config libxml++-3.0 --libs`
|
2020-09-14 22:55:03 +00:00
|
|
|
|
2020-09-16 12:01:41 +00:00
|
|
|
PARSERS = udrevaka.o padagali.o lightofindia.o ukarla.o alcapone.o plac.o zo.o
|
2020-09-14 22:55:03 +00:00
|
|
|
|
|
|
|
.PHONY: default
|
|
|
|
default: menuprint
|
|
|
|
|
2020-09-16 09:20:06 +00:00
|
|
|
menuprint: main.o meal.o menu.o network.o restaurants.o $(PARSERS)
|
2020-09-14 22:55:03 +00:00
|
|
|
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
|
|
|
|
2020-09-15 15:25:27 +00:00
|
|
|
main.o: main.cpp restaurant.hpp menu.hpp meal.hpp restaurants/restaurants.hpp
|
2020-09-14 22:55:03 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
meal.o: meal.cpp meal.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
menu.o: menu.cpp menu.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
network.o: network/network.cpp network/network.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-16 09:20:06 +00:00
|
|
|
restaurants.o: restaurants/restaurants.cpp restaurants/restaurants.hpp
|
2020-09-14 22:55:03 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-16 09:20:06 +00:00
|
|
|
udrevaka.o: restaurants/udrevaka.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
2020-09-14 22:55:03 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-16 09:20:06 +00:00
|
|
|
padagali.o: restaurants/padagali.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
2020-09-14 22:55:03 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-16 09:20:06 +00:00
|
|
|
lightofindia.o: restaurants/lightofindia.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
2020-09-14 22:55:03 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-16 09:20:06 +00:00
|
|
|
ukarla.o: restaurants/ukarla.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
alcapone.o: restaurants/alcapone.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-16 12:01:41 +00:00
|
|
|
plac.o: restaurants/plac.cpp restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
zo.o: restaurants/zo.cpp restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
2020-09-15 14:05:16 +00:00
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
2020-09-14 22:55:03 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -Rf *.o menuprint
|