diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1,7 +1,12 @@ -CC=arm-linux-gnueabihf-gcc -CFLAGS=-Wall -Wextra -I. -IImageMagick -LDFLAGS=-lpthread -LImageMagick/MagickCore/.libs -LDLIBS=-lMagickCore-7.Q8 -lm +CROSS=arm-linux-gnueabihf +DEPLIBS=MagickCore libpng16 zlib +PKGCONFIG=PKG_CONFIG_PATH=/usr/$(CROSS)/lib/pkgconfig pkg-config +CC=$(CROSS)-gcc +CFLAGS=-Wall -Wextra -I. $$($(PKGCONFIG) --cflags MagickCore) +LDFLAGS=-lpthread $$($(PKGCONFIG) --libs-only-L $(DEPLIBS)) +LDLIBS=$$($(PKGCONFIG) --libs-only-l $(DEPLIBS)) -lm + +all: install-deps freeonebook freeonebook: freeonebook.o gpio.o fb.o convert.o @@ -15,3 +20,9 @@ convert.o: convert.c convert.h clean: rm -f freeonebook *.o + +install-deps: deps.installed + +deps.installed: + cd deps; $(MAKE) all + touch $@ |