chiark / gitweb /
Renames and cleanups.
[ypp-sc-tools.db-live.git] / pctb / Makefile
index 7d1d6efad02f7cffab871472b992e38e3f26deba..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)
+
+TARGETS= ypp-commodities
+
+all: $(TARGETS)
 
 CONVERT_OBJS= convert.o ocr.o pages.o structure.o
 
-convert: $(CONVERT_OBJS) -lnetpbm -lXtst -lX11
-$(CONVERT_OBJS): ocr.h convert.h structure.h
+ypp-commodities: $(CONVERT_OBJS) -lnetpbm -lXtst -lX11
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+$(CONVERT_OBJS): ocr.h convert.h structure.h common.h
 
-x-manip-window: -lXtst -lX11
+clean:
+       rm -f $(TARGETS) *.o core core.* *~ t t.* u u.* ./#pages#.ppm