1#
2# ============================================================================
3#
4# This is the Makefile for the uu library, part of the uudeview package.
5# The values here were guessed by ./configure and are probably correct.
6#
7# Usefull targets
8#	all		Compile the package
9#	clean		Deletes the binaries and objects and all the
10#			other dirty stuff.
11#
12# ============================================================================
13#
14# $Id: Makefile.in,v 1.6 2002/03/11 09:15:46 fp Exp $
15#
16# your make might need this
17#
18SHELL	=	/bin/sh
19#
20# If you don't have the GNU C compiler installed, set CC=cc here
21#
22CC	=	@CC@
23#
24# C Compiler Options
25#
26CFLAGS	=	@CFLAGS@ -I. @CPPFLAGS@ @DEFS@
27#
28# the ranlib program
29#
30RANLIB =	@RANLIB@
31#
32###############################################################################
33# You shouldn't have to change anything below.
34###############################################################################
35#
36# Programs to compile, Manpages to install and Versions
37#
38VERSION	=	@VERSION@
39PATCH	=	@PATCH@
40VDEF	=	-DVERSION=\"$(VERSION)\" -DPATCH=\"$(PATCH)\"
41#
42
43UULIB_SOURCE	=	uulib.c uucheck.c uunconc.c uuutil.c uuencode.c \
44			uuscan.c uustring.c fptools.c crc32.c
45UULIB_OBJ	=	${UULIB_SOURCE:.c=.o}
46
47#
48# make stuff
49#
50
51.SUFFIXES:
52.SUFFIXES: .c .o .so
53
54all:		libuu.a
55
56clean:
57	rm -f [Xx]deview gif2gfp
58	rm -f *.o *.a *.so core *~ TAGS
59
60distclean:	clean
61	rm -f config.status config.cache config.log Makefile config.h
62	rm -f uudeview-*tar* uudeview-sfx
63
64realclean:	distclean
65
66new:		clean
67	rm -f libuu.a
68	$(MAKE) all
69
70libuu.a:	$(UULIB_OBJ)
71	rm -f $@
72	ar r $@ $(UULIB_OBJ)
73	-$(RANLIB) $@
74
75SOBJS=	$(UULIB_OBJ:.o=.so)
76libuu.so.3.0:	$(SOBJS)
77	rm -f $(.TARGET)
78	ld -Bshareable -x -o libuu.so.3.0 `lorder $(SOBJS) | tsort -q`
79
80libuu.so.3:	$(SOBJS)
81	rm -f $(.TARGET)
82	$(CC) -shared -Wl,-x,-soname,libuu.so.3 -o libuu.so.3 $(SOBJS)
83
84.c.so:
85	$(CC) -fpic -DPIC -c -o $(.TARGET) $(CFLAGS) $(VDEF) $(.IMPSRC)
86
87.c.o:
88	$(CC) -c $(CFLAGS) $(VDEF) $<
89
90
91uuencode.o:	uuencode.c uudeview.h uuint.h uustring.h fptools.h config.h
92uulib.o:	uulib.c uudeview.h uuint.h uustring.h fptools.h config.h
93uunconc.o:	uunconc.c uudeview.h uuint.h uustring.h fptools.h config.h
94uucheck.o:	uucheck.c uudeview.h uuint.h uustring.h fptools.h config.h
95uuutil.o:	uuutil.c  uudeview.h uuint.h uustring.h fptools.h config.h
96uuscan.o:	uuutil.c  uudeview.h uuint.h uustring.h fptools.h config.h
97uustring.o:	uustring.c uudeview.h uuint.h uustring.h config.h
98fptools.o:	fptools.c fptools.h config.h
99
100uustring.h:	uustring.c
101	awk -f uustring.awk < uustring.c > uustring.h
102