-LDLIBS += -lnetpbm
-CFLAGS += -Wall -Wwrite-strings -Wpointer-arith -Wmissing-prototypes \
- -Wstrict-prototypes -Werror -g
+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= convert x-manip-window
-convert.o ocr.o: ocr.h
+all: $(TARGETS)
+
+CONVERT_OBJS= convert.o ocr.o pages.o structure.o common.o
+
+convert: $(CONVERT_OBJS) -lnetpbm -lXtst -lX11
+$(CONVERT_OBJS): ocr.h convert.h structure.h
+
+x-manip-window: -lXtst -lX11
+
+clean:
+ rm -f $(TARGETS) *.o core core.*