PREFIX=/usr BINDIR=$(PREFIX)/bin SHAREDIR=$(PREFIX)/share CFLAGS=-Wall -g3 OBJECTS=main.o gcode.o mirror.o move.o info.o preview.o preview_term.o preview_pnm.o ifneq ($(shell pkg-config $(PCFLAGS) --libs sdl2 2> /dev/null),) LIBS+=$(shell pkg-config $(PCFLAGS) --libs sdl2) CFLAGS+=$(shell pkg-config $(PCFLAGS) --cflags sdl2) -DHAS_SDL=1 OBJECTS+=preview_sdl.o endif gcodetool: $(OBJECTS) $(CC) $^ $(LIBS) -lm -o $@ static: CC+=-static static: PCFLAGS+=--static static: gcodetool install: gcodetool install -D gcodetool $(BINDIR)/gcodetool install -D gcodetool.thumbnailer $(SHAREDIR)/thumbnailers/gcodetool.thumbnailer clean: rm -f $(OBJECTS) gcodetool