File: Makefile

package info (click to toggle)
oflib 0git20070620-7
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 144 kB
  • ctags: 85
  • sloc: ansic: 751; makefile: 46
file content (27 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (4)
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
include_dir=/usr/local/include/ofapi

LIBNAME = libofapi.so
SONAME = $(LIBNAME).0
SOVERSION = $(SONAME).0.0

default:
	gcc -g -Wall -D_REENTRANT -DPIC -fpic -Wl,-soname -Wl,$(SONAME) lib/*.c -shared -o $(SOVERSION)

install:
	cp $(SOVERSION) /usr/local/lib
	ln -s /usr/local/lib/$(SOVERSION) /usr/local/lib/$(SONAME)
	ln -s /usr/local/lib/$(SOVERSION) /usr/local/lib/$(LIBNAME)
	test -d "$(include_dir)" || mkdir "$(include_dir)"
	cp lib/*.h $(include_dir)

all:
	make default
	make install
	make examples

examples:
	make -C example/

clean:
	make -C example/ clean 
	rm -f libofapi.so.*