xref: /illumos-gate/usr/src/lib/lib9p/Makefile.com (revision dd72704bd9e794056c558153663c739e2012d721)
1#
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.
6#
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.
10#
11
12#
13# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
14#
15
16LIBRARY=	lib9p.a
17VERS=		.1
18
19OBJECTS=	backend/fs.o \
20		connection.o \
21		genacl.o \
22		hashtable.o \
23		log.o \
24		pack.o \
25		request.o \
26		rfuncs.o \
27		sbuf/sbuf.o \
28		threadpool.o \
29		transport/socket.o \
30		utils.o
31HDRS =		lib9p.h
32
33LOBJDIRS=	backend transport sbuf
34
35include ../../Makefile.lib
36
37LIBS =		$(DYNLIB)
38LDLIBS +=	-lc -lcustr -lsocket -lsec -lnvpair
39
40SRCDIR =	..
41
42CSTD =		$(CSTD_GNU99)
43
44CFLAGS +=	$(CCVERBOSE)
45
46CPPFLAGS +=	-D__illumos__
47CPPFLAGS +=	-D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__
48CPPFLAGS +=	-I../common -I../common/backend
49$(NOT_RELEASE_BUILD)CPPFLAGS +=	-DL9P_DEBUG=L9P_DEBUG
50
51SMOFF += all_func_returns
52
53.KEEP_STATE:
54
55all: $(LIBS)
56
57$(LIBS): mkpicdirs
58
59mkpicdirs:
60	@mkdir -p $(LOBJDIRS:%=pics/%)
61
62pics/%.o: ../common/%.c
63	$(COMPILE.c) -o $@ $<
64	$(POST_PROCESS_O)
65
66pics/backend/%.o: ../common/backend/%.c
67	$(COMPILE.c) -o $@ $<
68	$(POST_PROCESS_O)
69
70pics/transport/%.o: ../common/transport/%.c
71	$(COMPILE.c) -o $@ $<
72	$(POST_PROCESS_O)
73
74$(ROOTHDRDIR)/%.h: ../common/%.h
75	$(INS.file)
76
77include ../../Makefile.targ
78