-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile.win32
79 lines (75 loc) · 1.61 KB
/
Makefile.win32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# For an out-of-tree build, set VPATH appropriately:
VPATH=.
# (You will also have to manually create the 'rx' and 'src'
# directories if they do not already exist.)
# For a cross-compilation, set CC appropriately:
# CC=i586-mingw32msvc-cc
CPPFLAGS=-I$(VPATH) -Isrc
CFLAGS=-mno-cygwin -W -Wall -O2
LDFLAGS=-mno-cygwin
EXE_EXT=.exe
LIBS=-lws2_32
#MODULES=
MODULES=helpserv memoserv qserver snoop sockcheck
PROTOCOL=p10
ifeq ($(PROTOCOL),p10)
CFLAGS += -DWITH_PROTOCOL_P10
else
CFLAGS += -DWITH_PROTOCOL_BAHAMUT
endif
RX_OBJS = \
rx/rx.o \
rx/rxanal.o \
rx/rxbasic.o \
rx/rxbitset.o \
rx/rxcset.o \
rx/rxgnucomp.o \
rx/rxhash.o \
rx/rxnfa.o \
rx/rxnode.o \
rx/rxposix.o \
rx/rxsimp.o \
rx/rxspencer.o \
rx/rxstr.o \
rx/rxsuper.o \
rx/rxunfa.o
SRVX_OBJS = \
src/chanserv.o \
src/compat.o \
src/conf.o \
src/dict-splay.o \
src/git-version.o \
src/gline.o \
src/global.o \
src/hash.o \
src/heap.o \
src/helpfile.o \
src/ioset-select.o \
src/ioset-win32.o \
src/ioset.o \
src/log.o \
src/main-win32.o \
src/md5.o \
src/modcmd.o \
src/modules.o \
src/nickserv.o \
src/opserv.o \
src/policer.o \
src/proto-$(PROTOCOL).o \
src/recdb.o \
src/saxdb.o \
src/mail-smtp.o \
src/timeq.o \
src/tools.o \
$(addsuffix .o,$(addprefix src/mod-,$(MODULES)))
srvx$(EXE_EXT): src/config.h src/modules-list.h $(RX_OBJS) $(SRVX_OBJS)
$(CC) -o $@ $(LDFLAGS) $(RX_OBJS) $(SRVX_OBJS) $(LIBS)
src/config.h: $(VPATH)/src/config.h.win32
cp $< $@
src/modules-list.h:
rm -f $@ ; \
for module in $(MODULES) ; do \
echo "WITH_MODULE($$module)" >> $@ ; \
done
clean:
rm -f src/config.h src/modules-list.h */*.o */*.exe