-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
36 lines (29 loc) · 860 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
include CONFIG
all: bindata control data lib/libcin.a tests utils
# create dynamically and statically-linked libs.
lib/libcin.a: $(LIBOBJECTS)
test -d lib || mkdir lib
$(AR) -rcs $@ $(LIBOBJECTS)
lib/libcin.so: $(LIBSOURCES)
test -d lib || mkdir lib
$(CC) $(CFLAGS) -shared -o $@ $(LIBOBJECTS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY :clean
clean:
-$(RM) -f *.o
-$(RM) -rf lib
$(MAKE) -C data clean
$(MAKE) -C tests clean
$(MAKE) -C control clean
$(MAKE) -C utils clean
$(MAKE) -C bindata clean
.PHONY :install
install: all
test -d $(prefix) || mkdir $(prefix)
test -d $(prefix)/lib || mkdir $(prefix)/lib
test -d $(prefix)/bin || mkdir $(prefix)/bin
test -d $(prefix)/include || mkdir $(prefix)/include
$(INSTALL_DATA) lib/libcin.a $(libdir)
$(INSTALL_DATA) cin.h $(includedir)
$(INSTALL_PROGRAM) utils/cindump $(bindir)