blob: 659bf4f5a1e7fc8eda83a6682c2e8ceae0c54c9e (
plain) (
blame)
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
|
#///////////////////////////////////////////////////////////////////////////////
#//
#//
#///////////////////////////////////////////////////////////////////////////////
# primary dependencies
NAME = samp
VERSION = 1.0
PLATFORM := $(shell uname -s)
HERE := $(shell /bin/pwd)
APIDIR := $(HERE)/src
# secondary dependencies
LIBBASE = lib$(NAME)
STATICLIB = $(HERE)/$(LIBBASE).a
SHAREDLIB = $(HERE)/$(LIBBASE).so.$(VERSION)
# stuff that's precious to keep
.PRECIOUS: $(STATICLIB) $(SHAREDLIB)
.KEEP_STATE:
# includes, flags and libraries
CC = gcc
CINCS = -I$(HERE) -I../include -I../include/psock
CFLAGS = -g -D$(PLATFORM) -m32 -Wall $(CINCS)
LFLAGS = -L. -L../lib
COMMON_LIBS = -lpthread -lm
XRPC_LIBS = -lxrpc
# list of source and include files
SRCS =
OBJS =
INCS =
# targets
all: xrpc ps1 ps2 ps3 ps4 ps5 ps6 ps7
clean:
/bin/rm -rf xrpc
/bin/rm -rf ps[1-7]
/bin/rm -rf *.o *.a *.e
everything:
make clean
make all
make install
install: all
# Unit test programs to be built.
zztest: zztest.c
$(CC) $(CFLAGS) -o zztest zztest.c $(LFLAGS) $(COMMON_LIBS) $(XRPC_LIBS)
#=======================
# leave this stuff alone
#=======================
%.o: %.c $(INCS)
$(CC) -Wall $(CINCS) $(CFLAGS) -c $< -o $@
|