Improve makefile and readme

This commit is contained in:
ave 2020-12-05 00:24:46 +03:00
parent 7f4b114fee
commit be98d6b2c5
2 changed files with 22 additions and 6 deletions

View file

@ -4,10 +4,20 @@ LIBS = -lrlottie
DEPS = lodepng.cpp
TARGET = lfe
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
all: $(TARGET)
$(TARGET): $(TARGET).cpp
$(CC) $(CFLAGS) -o $(TARGET) $(DEPS) $(TARGET).cpp $(LIBS)
$(CC) $(CFLAGS) -o $(TARGET) $(DEPS) $(TARGET).cpp $(LIBS)
install: $(TARGET)
install -m 644 $(TARGET) $(DESTDIR)$(PREFIX)/bin/
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET)
clean:
$(RM) $(TARGET)
$(RM) $(TARGET)

View file

@ -6,21 +6,27 @@ Codebase is a mess. You've been warned.
## Deps
- https://github.com/Samsung/rlottie -> Don't forget to do make install
- https://github.com/Samsung/rlottie -> Don't forget to do make install (you'll likely want to go with the cmake route)
- https://github.com/lvandeve/lodepng -> Already included here. Licensed Zlib.
## How to build
You'll also need g++.
## How to build and install
```bash
make
```
You'll need g++.
To install:
```bash
sudo make install
```
## How to use
```bash
./lfe mylottieanimation.json 420x420
lfe mylottieanimation.json 420x420
```
This will extract all frames as PNG files in the working directory.