1# In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf).
2
3# Select your setup size:
4CFLAGS += -DNUMBER_OF_MODEMS=64
5
6# Uncomment for Solaris
7# CFLAGS += -D SOLARIS
8# This might be also needed for Solaris:
9# CC=gcc
10
11# Comment this out, to enable statistics
12#CFLAGS += -D NOSTATS
13
14# Uncomment this to disable usage of inotify
15#CFLAGS += -D DISABLE_INOTIFY
16
17# Uncomment for FreeBSD if statistics are enabled
18#CFLAGS += -I/usr/local/include
19
20# Uncomment for FreeBSD if inotify is used
21#LFLAGS += -L/usr/local/lib -linotify
22
23# Uncomment this to force smsd to run in terminal mode
24#CFLAGS += -D TERMINAL
25
26# Uncomment this to disable usage of inet socket
27#CFLAGS += -D DISABLE_INET_SOCKET
28
29# Uncomment this to disable usage of national language shift tables
30#CFLAGS += -D DISABLE_NATIONAL_LANGUAGE_SHIFT_TABLES
31
32# Uncomment this to support european national languages only
33#CFLAGS += -D NATIONAL_LANGUAGES_EUROPEAN_ONLY
34
35# Uncomment this to print national language shift tables (smsd does not do anything else)
36#CFLAGS += -D PRINT_NATIONAL_LANGUAGE_SHIFT_TABLES
37
38# Uncomment to add debug info
39# CFLAGS += -ggdb -O0
40
41# The following option is only used by developers
42# CFLAGS += -D DEBUGMSG
43
44CFLAGS += -W -Wall
45
46# The following enables logfile size more than 2GB
47CFLAGS += -D_FILE_OFFSET_BITS=64
48
49# Use the following only on GNU/Linux and only if you need ps listing like "smsd: MAINPROCESS" and "smsd: GSM1"
50# CFLAGS += -D USE_LINUX_PS_TRICK
51
52all: smsd
53
54smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o charshift.o
55
56ifneq (,$(findstring SOLARIS,$(CFLAGS)))
57ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
58	override LDFLAGS += -lsocket -lnsl
59endif
60endif
61
62ifneq (,$(findstring NOSTATS,$(CFLAGS)))
63	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
64else
65	$(CC) `mm-config --cflags` $(CFLAGS) -o $@ $^ `mm-config --ldflags --libs` $(LDFLAGS)
66endif
67
68clean:
69	rm -f *.o smsd *.exe *~
70