chiark / gitweb /
Renames and cleanups.
[ypp-sc-tools.db-live.git] / pctb / Makefile
index bff47f5bd2f818d95bed640ba42229c6400625c4..afea4283118d4eb6f7b69942149a06d75d24c218 100644 (file)
@@ -1,5 +1,22 @@
-LDLIBS += -lnetpbm
-CFLAGS += -Wall -Wwrite-strings -Wpointer-arith -Wmissing-prototypes \
-       -Wstrict-prototypes
+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)
+
+TARGETS= ypp-commodities
+
+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