common: Ensure we properly define URI_PREFIX as part of the build.

This commit is contained in:
Solomon Peachy 2013-12-18 18:28:13 -05:00
parent b4ab36693a
commit 13e25a4c95
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,5 @@
BACKEND_NAME = gutenprint52+usb
CFLAGS = -Wall -Wextra -g
LDFLAGS = -lusb-1.0
@ -13,13 +15,13 @@ SOURCES = backend_common.c $(addsuffix .c,$(addprefix backend_,$(BACKENDS)))
all: gutenprint $(BACKENDS)
gutenprint: $(SOURCES) $(DEPS)
gcc -o $@ $(SOURCES) $(LDFLAGS) $(CFLAGS)
gcc -o $@ $(SOURCES) $(LDFLAGS) $(CFLAGS) -DURI_PREFIX=\"$(BACKEND_NAME)\"
$(BACKENDS): gutenprint
ln -sf gutenprint $@
install:
install -o root -m 700 gutenprint $(CUPS_BACKEND_DIR)/gutenprint52usb
install -o root -m 700 gutenprint $(CUPS_BACKEND_DIR)/$(BACKEND_NAME)
mkdir -p $(CUPS_DATA_DIR)/usb
install -o root -m 644 blacklist $(CUPS_DATA_DIR)/usb/net.sf.gimp-print.usb-quirks

View file

@ -29,7 +29,7 @@
#define BACKEND_VERSION "0.26"
#ifndef URI_PREFIX
#define URI_PREFIX "gutenprint+usb"
#error "Must Define URI_PREFIX"
#endif
/* Support Functions */