-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
51 lines (37 loc) · 1002 Bytes
/
Makefile.in
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
CC = @CC@
CFLAGS = @CFLAGS@ @OCFLAGS@ -I.
MAKE_P = @MAKE_P@
SRCS = @SOURCES@
OBJS = $(SRCS:.c=.o)
PROG = libncsnet
UTILS_DIR = utils
TESTS_DIR = tests
STATIC_LIB = $(PROG).a
DYNAMIC_LIB = $(PROG).so
all: endmsg
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STATIC_LIB): $(OBJS)
ar rcs $@ $(OBJS)
$(DYNAMIC_LIB): $(OBJS)
$(CC) -shared -o $@ $(OBJS)
libraries: $(STATIC_LIB) $(DYNAMIC_LIB)
tests: libraries
cd $(TESTS_DIR);$(MAKE_P);cd ..
utils: libraries
cd $(UTILS_DIR);$(MAKE_P);cd ..
clean:
rm -rf config.status config.log autom4te.cache Makefile config.h $(OBJS) $(STATIC_LIB) $(DYNAMIC_LIB)
cd $(TESTS_DIR);$(MAKE_P) clean;cd ..
cd $(UTILS_DIR);$(MAKE_P) clean;cd ..
distclean: clean
rm -f configure
endmsg: libraries tests utils
@echo ""
@echo ""
@echo "COMPILE COMPLETED"
@echo "The library and utils has been successfully compiled!"
@echo "Check \"libncsnet.a\", \"libncsnet.so\", and \"utils/\""
@echo ""
@echo ""
.PHONY: all clean distclean libraries tests utils endmsg