+# Define if you want support for wide characters (needs libncursesw)
+CONFIG_WIDE_CURSES=1
+
+# Define if you want XKB led controls and on-screen display via OSDD
+CONFIG_X11=1
+
+# Define if you want watching mail changes by inotify
+CONFIG_INOTIFY=1
+
#DEBUG=-ggdb
-CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline $(DEBUG) -std=gnu99
-LDFLAGS=-lncurses
+CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline $(DEBUG) -std=gnu99 -DVERSION=$(VERSION) -DYEAR=$(YEAR)
+
+ifeq ($(CONFIG_WIDE_CURSES),1)
+LDLIBS=-lncursesw
+CFLAGS+=-DCONFIG_WIDE_CURSES=1
+else
+LDLIBS=-lncurses
+endif
+
+ifeq ($(CONFIG_X11),1)
+LDLIBS+=-lX11
+CFLAGS+=-DCONFIG_X11=1
+endif
+
+ifeq ($(CONFIG_INOTIFY),1)
+CFLAGS+=-DCONFIG_INOTIFY=1
+endif
+
+VERSION=1.12
+YEAR=2023
all: cm
-cm: cm.o util.o
+cm: cm.o util.o charset.o rfc822.o
-cm.o: cm.c clists.h util.h
+cm.o: cm.c clists.h util.h charset.h
util.o: util.c util.h
+charset.o: charset.c util.h charset.h rfc822.h
+rfc822.o: rfc822.c util.h rfc822.h
clean:
rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
- rm -f cm
+ rm -f cm log
+ rm -rf maint/dist
distclean: clean