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 DEPS = lodepng.cpp
TARGET = lfe TARGET = lfe
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
all: $(TARGET) all: $(TARGET)
$(TARGET): $(TARGET).cpp $(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: clean:
$(RM) $(TARGET) $(RM) $(TARGET)

View File

@ -6,21 +6,27 @@ Codebase is a mess. You've been warned.
## Deps ## 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. - https://github.com/lvandeve/lodepng -> Already included here. Licensed Zlib.
## How to build You'll also need g++.
## How to build and install
```bash ```bash
make make
``` ```
You'll need g++. To install:
```bash
sudo make install
```
## How to use ## How to use
```bash ```bash
./lfe mylottieanimation.json 420x420 lfe mylottieanimation.json 420x420
``` ```
This will extract all frames as PNG files in the working directory. This will extract all frames as PNG files in the working directory.