blob: 653c26021bd0246e3cfa0fe9f6fb06ad0ee14130 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#-----------------------------------------------------------------------------
# $Id: lib.mk,v 1.3 1997/01/07 13:14:36 simonm Exp $
# Useful variables:
# ARCHIVE = archive name
# LIBOBJS = list of object files
# DESTDIR = where to install
# INSTALLED_NAME = name to install as (default = $(ARCHIVE))
# C_DEP_SRCS = sources for C make depend (optional)
# HS_DEP_SRCS = sources for Haskell make depend (optional)
#-----------------------------------------------------------------------------
ifndef INSTALLED_NAME
INSTALLED_NAME = $(ARCHIVE)
endif
all :: $(ARCHIVE)
$(ARCHIVE) :: $(LIBOBJS)
@$(RM) $@
$(AR) $@ $(LIBOBJS)
$(RANLIB) $@
install :: $(ARCHIVE)
$(INSTALL) $(INSTLIBFLAGS) $(ARCHIVE) $(DESTDIR)/$(INSTALLED_NAME)
cd $(DESTDIR); $(RANLIB) $(INSTALLED_NAME)
clean ::
$(RM) $(LIBOBJS)
$(RM) $(ARCHIVE)
ifdef C_DEP_SRCS
include $(TOP)/mk/cdepend.mk
endif
ifdef HS_DEP_SRCS
include $(TOP)/mk/hsdepend.mk
endif
|