blob: 03e3d34b10c15c4e109158cadf06be591932174f (
plain)
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
|
CC = cc
PREFIX = /usr/local
CFLAGS = --std=c99 -O2 -fomit-frame-pointer -Wall -D_BSD_SOURCE -D_GNU_SOURCE
CFLAGS += -Ienet/include
# Force linkage to built-in libenet
LDFLAGS = enet/libenet.a
#LDFLAGS = -Lenet -lenet
VERSION = 001
CFLAGS += -D_VERSION=$(VERSION)
OBJECTS = main.o auth.o
BINARY = sauerbot
all: libenet $(BINARY)
$(BINARY): $(OBJECTS)
$(CC) $(CFLAGS) -o $(BINARY) $(OBJECTS) $(LDFLAGS)
enet/Makefile:
cd enet; ./configure
libenet: enet/Makefile
$(MAKE) -C enet/ all
main.o: main.h auth.h
auth.o: main.h auth.h
install: all
-mkdir -p $(PREFIX)/bin
-install -o 0 -g 0 -m 755 $(BINARY) $(PREFIX)/bin/
clean: enet/Makefile
-rm -f *~ *.o *.orig *.rej $(BINARY)
$(MAKE) -C enet/ clean
distclean: clean
$(MAKE) -C enet/ distclean
|