chiark / gitweb /
Renames and cleanups.
[ypp-sc-tools.db-live.git] / pctb / Makefile
index 55f4d53bcb7002d7c6245aef61fb5cba2ef4059e..afea4283118d4eb6f7b69942149a06d75d24c218 100644 (file)
@@ -1,11 +1,22 @@
-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 x-manip-window
+CFLAGS += $(WARNINGS) $(WERROR) $(OPTIMISE) $(DEBUG)
 
-CONVERT_OBJS= convert.o ocr.o pages.o
+TARGETS= ypp-commodities
 
-convert: $(CONVERT_OBJS) -lnetpbm -lXtst -lX11
-$(CONVERT_OBJS): ocr.h
+all: $(TARGETS)
 
-x-manip-window: -lXtst -lX11
+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