Move pylibbe to openindiana category
[unleashed-userland.git] / components / openindiana / pylibbe / src / Makefile
blobc3418a0c8f2fb29cbba080548c4fa6aa68ef33b0
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2014 Alexander Pyhalov. All rights reserved.
16 CC?=gcc
17 SRCS=libbe_py.c
18 OBJS=libbe_py_26.o libbe_py_27.o
19 TGTS=libbe_py_26.so libbe_py_27.so
20 LIBS=-lbe -lnvpair -lc
21 MAPFILE=mapfile-vers
23 LDFLAGS+= -Wl,-M$(MAPFILE)
25 all: libbe_py_26.so libbe_py_27.so
27 libbe_py_26.so: libbe_py_26.o
28 $(CC) $(CFLAGS) $(LDFLAGS) -shared $< -lpython2.6 $(LIBS) -o $@
30 libbe_py_27.so: libbe_py_27.o
31 $(CC) $(CFLAGS) $(LDFLAGS) -shared $< -lpython2.7 $(LIBS) -o $@
33 libbe_py_26.o: libbe_py.c Makefile
34 $(CC) -c $(CFLAGS) libbe_py.c -fPIC -DPIC -I/usr/include/python2.6 -o $@
36 libbe_py_27.o: libbe_py.c Makefile
37 $(CC) -c $(CFLAGS) libbe_py.c -fPIC -DPIC -I/usr/include/python2.7 -o $@
39 clean:
40 rm -fr $(OBJS) $(TGTS)
42 install:
43 # Do nothing, files are picked from BUILD_DIR