blob: c3d99de9328e64edb4612de38b1e27683aeb6fdb (
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
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author: Martin Schlemmer <azarah@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/files/filefuncs/Makefile,v 1.6 2005/05/14 17:56:03 vapier Exp $
CC ?= gcc
LD = $(CC)
MAJORVER = 0
MINORVER = 0.1
AWKINCDIR = /usr/include/awk
DESTDIR =
TARGET = filefuncs
TARGET_LIB = $(TARGET).so.$(MAJORVER).$(MINORVER)
LIBDIR = lib
all: $(TARGET_LIB)
$(TARGET).o: $(TARGET).c
$(CC) -shared -Wall -DHAVE_CONFIG_H -c -O2 -fPIC -I$(AWKINCDIR) $^
$(TARGET_LIB): $(TARGET).o
$(LD) -o $@ -shared -Wl,-soname -Wl,$(TARGET).so.$(MAJORVER) $^
install: $(TARGET_LIB)
install -m 0755 -d $(DESTDIR)/$(LIBDIR)/rcscripts
install -m 0755 $(TARGET_LIB) $(DESTDIR)/$(LIBDIR)/rcscripts
ln -s $(TARGET_LIB) $(DESTDIR)/$(LIBDIR)/rcscripts/$(TARGET).so.$(MAJORVER)
ln -s $(TARGET_LIB) $(DESTDIR)/$(LIBDIR)/rcscripts/$(TARGET).so
clean:
rm -f $(TARGET)
rm -f *.o *~ core
|