• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# This is a Makefile stub which handles the creation of BSD shared
3# libraries.
4#
5# In order to use this stub, the following makefile variables must be defined.
6#
7# BSDLIB_VERSION = 1.0
8# BSDLIB_IMAGE = libce
9# BSDLIB_MYDIR = et
10# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
11#
12
13all:: image
14
15real-subdirs:: Makefile
16	@echo "	MKDIR pic"
17	@mkdir -p pic
18
19BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION)
20BSDLIB_PIC_FLAG = -fpic
21
22image:		$(BSD_LIB)
23
24$(BSD_LIB): $(OBJS)
25	(cd pic; ld -Bshareable -o $(BSD_LIB) $(OBJS))
26	$(MV) pic/$(BSD_LIB) .
27	$(RM) -f ../$(BSD_LIB)
28	$(LN) $(BSD_LIB) ../$(BSD_LIB)
29
30install-shlibs install:: $(BSD_LIB)
31	@echo "	INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
32	@$(INSTALL_PROGRAM) $(BSD_LIB) \
33		$(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
34	@-$(LDCONFIG)
35
36install-strip: install
37
38install-shlibs-strip: install-shlibs
39
40uninstall-shlibs uninstall::
41	$(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
42
43clean::
44	$(RM) -rf pic
45	$(RM) -f $(BSD_LIB)
46	$(RM) -f ../$(BSD_LIB)
47