diff options
| author | Jakob Kaivo <jkk@xcc.kaivo.net> | 2018-11-12 20:21:52 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@xcc.kaivo.net> | 2018-11-12 20:21:52 -0500 |
| commit | 6c6528e3a508c8ab357b58e9744dd86ebf3e6914 (patch) | |
| tree | 8c1a9e2b071eca0ec864c17a7383b04bf635dcf8 /Makefile | |
| parent | b512299c974d6114d45069c8e87ca6b5429bee89 (diff) | |
automate dependency building
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 $@ |
