chiark / gitweb /
Renames and cleanups.
[ypp-sc-tools.main.git] / pctb / Makefile
index 3707d81f1f5cd054ffbfa73ccf5363ef1a4fbb4d..afea4283118d4eb6f7b69942149a06d75d24c218 100644 (file)
@@ -1,9 +1,22 @@
-LDLIBS += -lnetpbm
-CFLAGS += -Wall -Wwrite-strings -Wpointer-arith -Wmissing-prototypes \
-       -Wstrict-prototypes -Werror -g
+CC= gcc
+OPTIMISE= -O2
+WERROR= -Werror
+WARNINGS= -Wall -Wwrite-strings -Wpointer-arith -Wmissing-prototypes \
+         -Wstrict-prototypes -Wno-format-zero-length
+DEBUG=-g
 
-all: convert
+CFLAGS += $(WARNINGS) $(WERROR) $(OPTIMISE) $(DEBUG)
 
-convert: convert.o ocr.o
+TARGETS= ypp-commodities
 
-convert.o ocr.o: ocr.h
+all: $(TARGETS)
+
+CONVERT_OBJS= convert.o ocr.o pages.o structure.o
+
+ypp-commodities: $(CONVERT_OBJS) -lnetpbm -lXtst -lX11
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+$(CONVERT_OBJS): ocr.h convert.h structure.h common.h
+
+clean:
+       rm -f $(TARGETS) *.o core core.* *~ t t.* u u.* ./#pages#.ppm