diff --git a/.gitignore b/.gitignore index f78426c9..b69e598b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ zig-cache zig-out /vendor/lexbor/ -/vendor/netsurf/build/ \ No newline at end of file +/vendor/netsurf/build/ +/vendor/netsurf/lib/ +/vendor/netsurf/include/ \ No newline at end of file diff --git a/Makefile b/Makefile index ed40951b..d57f993e 100644 --- a/Makefile +++ b/Makefile @@ -77,36 +77,27 @@ install-netsurf: ls $(ICONV) 1> /dev/null || (printf "\e[33mERROR: you need to install libiconv in your system (on MacOS on with Homebrew)\e[0m\n"; exit 1;) && \ export PREFIX=$(BC_NS) && \ export LDFLAGS="-L$(ICONV)/lib" && \ - export CFLAGS="-I/$(ICONV)/include -I$(BC_NS)/libparserutils/include -I$(BC_NS)/libhubbub/include -I$(BC_NS)/libwapcaplet/include" && \ + export CFLAGS="-I$(ICONV)/include" && \ printf "\e[33mInstalling libwapcaplet...\e[0m\n" && \ cd vendor/netsurf/libwapcaplet && \ - BUILDDIR=$(BC_NS)/build/libwapcaplet make 2> /dev/null && \ + BUILDDIR=$(BC_NS)/build/libwapcaplet make install && \ cd ../libparserutils && \ printf "\e[33mInstalling libparserutils...\e[0m\n" && \ - BUILDDIR=$(BC_NS)/build/libparserutils make 2> /dev/null && \ + BUILDDIR=$(BC_NS)/build/libparserutils make install && \ cd ../libhubbub && \ printf "\e[33mInstalling libhubbub...\e[0m\n" && \ - BUILDDIR=$(BC_NS)/build/libhubbub make 2> /dev/null && \ + BUILDDIR=$(BC_NS)/build/libhubbub make install && \ + rm src/treebuilder/autogenerated-element-type.c && \ cd ../libdom && \ printf "\e[33mInstalling libdom...\e[0m\n" && \ - BUILDDIR=$(BC_NS)/build/libdom make 2> /dev/null && \ + BUILDDIR=$(BC_NS)/build/libdom make install && \ printf "\e[33mRunning libdom example...\e[0m\n" && \ - cd include/dom && \ - rm -f bindings || true && \ - ln -s ../../bindings bindings && \ - cd ../../examples && \ - rm -f a.out || true && \ + cd examples && \ clang \ -I$(ICONV)/include \ - -I$(BC_NS)/libdom/include \ - -I$(BC_NS)/libparserutils/include \ - -I$(BC_NS)/libhubbub/include \ - -I$(BC_NS)/libwapcaplet/include \ + -I$(BC_NS)/include \ -L$(ICONV)/lib \ - -L$(BC_NS)/build/libdom \ - -L$(BC_NS)/build/libparserutils \ - -L$(BC_NS)/build/libhubbub \ - -L$(BC_NS)/build/libwapcaplet \ + -L$(BC_NS)/lib \ -liconv \ -ldom \ -lhubbub \ @@ -114,6 +105,7 @@ install-netsurf: -lwapcaplet \ dom-structure-dump.c && \ ./a.out > /dev/null && \ + rm a.out && \ printf "\e[36mDone NetSurf $(OS)\e[0m\n"