]>
Commit | Line | Data |
---|---|---|
50e1e10f | 1 | # |
20562a48 | 2 | # This is a Makefile stub which handles the creation of BSD shared |
50e1e10f TT |
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 | ||
42c0b61c | 13 | all:: image |
50e1e10f | 14 | |
42c0b61c | 15 | real-subdirs:: Makefile |
02ef1962 TT |
16 | @echo " MKDIR pic" |
17 | @mkdir -p pic | |
50e1e10f TT |
18 | |
19 | BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION) | |
434661f8 | 20 | BSDLIB_PIC_FLAG = -fpic |
50e1e10f TT |
21 | |
22 | image: $(BSD_LIB) | |
23 | ||
24 | $(BSD_LIB): $(OBJS) | |
fd1677e8 | 25 | (cd pic; ld -Bshareable -o $(BSD_LIB) $(LDFLAGS_SHLIB) $(OBJS)) |
50e1e10f TT |
26 | $(MV) pic/$(BSD_LIB) . |
27 | $(RM) -f ../$(BSD_LIB) | |
5aa6c3f6 TT |
28 | (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ |
29 | `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB)) | |
50e1e10f TT |
30 | |
31 | install-shlibs install:: $(BSD_LIB) | |
522798d3 TT |
32 | @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)" |
33 | @$(INSTALL_PROGRAM) $(BSD_LIB) \ | |
39b50349 | 34 | $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB) |
522798d3 TT |
35 | @-$(LDCONFIG) |
36 | ||
37 | install-strip: install | |
38 | ||
39 | install-shlibs-strip: install-shlibs | |
50e1e10f | 40 | |
39b50349 TT |
41 | uninstall-shlibs uninstall:: |
42 | $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB) | |
43 | ||
50e1e10f TT |
44 | clean:: |
45 | $(RM) -rf pic | |
46 | $(RM) -f $(BSD_LIB) | |
47 | $(RM) -f ../$(BSD_LIB) |