-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
56 lines (44 loc) · 906 Bytes
/
Makefile
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
CXX ?=g++
INCL=
LIBS=-lgcrypt -lpthread
CXXFLAGS ?= -O2 -g
CXXFLAGS +=-Wall -shared -fPIC -DPIC
PLUGIN=radiusplugin.so
OBJECTS=\
RadiusClass/RadiusAttribute.o \
RadiusClass/RadiusPacket.o \
RadiusClass/RadiusConfig.o \
RadiusClass/RadiusServer.o \
RadiusClass/RadiusVendorSpecificAttribute.o \
AccountingProcess.o \
Exception.o \
PluginContext.o \
UserAuth.o \
AcctScheduler.o \
IpcSocket.o \
radiusplugin.o \
User.o \
AuthenticationProcess.o \
main.o \
UserAcct.o \
UserPlugin.o \
Config.o
ifeq ($(V),1)
Q=
NQ=true
else
Q=@
NQ=echo
endif
all: $(PLUGIN)
$(PLUGIN): $(OBJECTS)
@$(NQ) 'CXXLD $@'
$(Q)$(CXX) $(CXXFLAGS) $(OBJECTS) -o $(PLUGIN) $(LDFLAGS) $(LIBS)
%.o: %.cpp
@$(NQ) 'CXX $@'
$(Q)$(CXX) $(INCL) $(CXXFLAGS) -o $@ -c $<
test: $(OBJECTS)
@$(NQ) 'CXX $@'
$(Q)$(CXX) -Wall $(OBJECTS) -o main $(LDFLAGS) $(LIBS)
clean:
rm -f $(PLUGIN) *.o */*.o