WebMinifier - Installation


  • Prerequisites: Just a C compiler. Uses the CMake build system if available.
  • Source archives.

Build and install

This software is programmed in C language and uses the CMake build system.
From the project root directory, run:

mkdir build
cd build
sudo make install [DESTDIR=$(pwd)/pack]

To uninstall, run: sudo make uninstall

Manual build

For those who do not have or do not want to install the CMake build system, building is possible with a single make command or even a simple compiler (tested with GCC and CLang).

Without CMake

From src directory, run: make build.

Without Make

From src directory, run:

gcc -c -fpic libwebminifier.c
gcc -shared -o libwebminifier.so libwebminifier.o
rm -f libwebminifier.o
gcc -o webminifier webminifier.c -lwebminifier -L .

gcc can be replaced by clang.

Library file is libwebminifier.so, and executable is webminifier; usage:

LD_LIBRARY_PATH=. ./webminifier path/to/original/css_or_html_file path/to/minified_file

Library can be embedded into executable:

gcc [-static] -o webminifier libwebminifier.c webminifier.c

Linux distribution maintainers

Packages recipes are provided for Arch Linux (make archpack), Debian (make debpack) or Slackware (make slackpack).