Compare commits
No commits in common. "c73199e6d6dc55a3569842c5b0d56042319d6703" and "40e2076cd351c667c9b5501466b23eab75858edf" have entirely different histories.
c73199e6d6
...
40e2076cd3
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,7 +4,3 @@ menuprint
|
|||||||
.lvimrc
|
.lvimrc
|
||||||
example.*
|
example.*
|
||||||
dhparam*
|
dhparam*
|
||||||
.cache
|
|
||||||
.clang-format
|
|
||||||
build
|
|
||||||
compile_commands.json
|
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
||||||
enable_language(CXX)
|
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
pkg_check_modules(LIBXML REQUIRED libxml-2.0)
|
|
||||||
pkg_check_modules(LIBXMLPP REQUIRED libxml++-3.0)
|
|
||||||
find_library(Restbed restbed
|
|
||||||
PATHS /usr/lib)
|
|
||||||
find_library(Curl curl
|
|
||||||
PATHS /usr/lib)
|
|
||||||
|
|
||||||
project(LunchRest)
|
|
||||||
|
|
||||||
list(APPEND Restaurants
|
|
||||||
restaurants/udrevaka.cpp
|
|
||||||
restaurants/padagali.cpp
|
|
||||||
restaurants/lightofindia.cpp
|
|
||||||
restaurants/ukarla.cpp
|
|
||||||
restaurants/alcapone.cpp
|
|
||||||
restaurants/plac.cpp
|
|
||||||
restaurants/zo.cpp
|
|
||||||
restaurants/suzies.cpp
|
|
||||||
restaurants/tao.cpp
|
|
||||||
restaurants/mahostina.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(lunchrest)
|
|
||||||
|
|
||||||
target_sources(lunchrest
|
|
||||||
PRIVATE ${Restaurants}
|
|
||||||
PRIVATE main.cpp
|
|
||||||
PRIVATE meal.cpp
|
|
||||||
PRIVATE menu.cpp
|
|
||||||
PRIVATE network/network.cpp
|
|
||||||
PRIVATE restaurants/restaurants.cpp
|
|
||||||
PRIVATE environment.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(lunchrest ${LIBXML_LIBRARIES} ${LIBXMLPP_LIBRARIES} ${Restbed} ${Curl})
|
|
||||||
target_include_directories(lunchrest PUBLIC ${LIBXML_INCLUDE_DIRS} ${LIBXMLPP_INCLUDE_DIRS})
|
|
48
Makefile
Normal file
48
Makefile
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
CXX ?= g++
|
||||||
|
CFLAGS ?= -O2 -Wall -Wextra `pkg-config libxml-2.0 --cflags` `pkg-config libxml++-3.0 --cflags`
|
||||||
|
PREFIX ?= /usr/local/bin
|
||||||
|
LDFLAGS ?= -lcurl -lrestbed `pkg-config libxml-2.0 --libs` `pkg-config libxml++-3.0 --libs`
|
||||||
|
|
||||||
|
PARSERS = udrevaka.o padagali.o lightofindia.o ukarla.o alcapone.o plac.o zo.o suzies.o tao.o mahostina.o
|
||||||
|
|
||||||
|
.PHONY: default
|
||||||
|
default: menuprint
|
||||||
|
|
||||||
|
menuprint: main.o meal.o menu.o network.o restaurants.o environment.o $(PARSERS)
|
||||||
|
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS}
|
||||||
|
|
||||||
|
main.o: main.cpp restaurant.hpp menu.hpp meal.hpp restaurants/restaurants.hpp
|
||||||
|
$(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 $@ $<
|
||||||
|
restaurants.o: restaurants/restaurants.cpp restaurants/restaurants.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
environment.o: environment.cpp environment.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
udrevaka.o: restaurants/udrevaka.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
padagali.o: restaurants/padagali.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
lightofindia.o: restaurants/lightofindia.cpp restaurants.o restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
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 $@ $<
|
||||||
|
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
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
suzies.o: restaurants/suzies.cpp restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
tao.o: restaurants/tao.cpp restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
mahostina.o: restaurants/mahostina.cpp restaurants/restaurants.hpp network/network.hpp htmlparser.hpp
|
||||||
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -Rf *.o menuprint
|
Loading…
Reference in New Issue
Block a user