Makefile.in 1.76 KB
Newer Older
Arne Øslebø's avatar
Arne Øslebø committed
1
# $Id: Makefile.in,v 1.2 2005/06/30 12:02:49 juranek Exp $
Sampo Saaristo's avatar
Sampo Saaristo committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#
# Makefile.in for CRUDE
#
# Authors: Juha Laine     <james@cs.tut.fi>
#	   Sampo Saaristo <sambo@cc.tut.fi>
#
# Copyright (C) 1999 Juha Laine, Tampere, Finland
#                    All rights reserved
#
##############################################################################
SHELL = /bin/sh

prefix        = @prefix@
exec_prefix   = @exec_prefix@

bindir        = @bindir@
mandir        = @mandir@/man8
sbindir       = @sbindir@
srcdir        = @srcdir@

22 23 24 25
BININSTALL    = @INSTALL@ -o root -g root -m 0755
MANINSTALL    = @INSTALL@ -o root -g root -m 0644
VERSION       = @PACKAGE_VERSION@
VPATH         = @srcdir@
Sampo Saaristo's avatar
Sampo Saaristo committed
26

27 28 29 30 31 32
CC            = @CC@
CFLAGS        = @CFLAGS@
LDFLAGS       = @LDFLAGS@
DEFS          = @DEFS@
LIBS          = @LIBS@
MAN8          = crude.8
Sampo Saaristo's avatar
Sampo Saaristo committed
33

Arne Øslebø's avatar
Arne Øslebø committed
34
CRUDE_OBJS = main.o ../rude/mcast.o
Sampo Saaristo's avatar
Sampo Saaristo committed
35 36 37 38 39 40 41 42 43 44 45 46 47

##############################################################################
# Rules for make
##############################################################################
.c.o:
	$(CC) $(CFLAGS) $(DEFS) -c -o $*.o $<

all:	crude

crude:	$(CRUDE_OBJS)
	$(CC) $(CFLAGS) $(LIBS) $(DEFS) $(LDFLAGS) -o crude $(CRUDE_OBJS)

clean:
48
	rm -f *~ *.o *.rpm *.deb crude
Sampo Saaristo's avatar
Sampo Saaristo committed
49 50

distclean:
51
	rm -f *~ *.o *.rpm *.deb crude Makefile
Sampo Saaristo's avatar
Sampo Saaristo committed
52 53 54

install: crude
	@if [ ! -d $(bindir) ]; then mkdir -m 0755 $(bindir); fi;
55
	$(BININSTALL) crude $(bindir)
Sampo Saaristo's avatar
Sampo Saaristo committed
56
	@if [ ! -d $(mandir) ]; then mkdir -m 0755 $(mandir); fi;
57 58 59 60 61 62 63 64 65 66 67
	$(MANINSTALL) crude.8 $(mandir)

rpm deb: | crude
	fpm -s dir -t $@ -n crude -v $(VERSION) \
		--replaces crude \
		--description "collector for rude (real-time UDP data emitter)" \
		--url "http://rude.sourceforge.net" \
		crude=$(bindir)/crude \
		crude.8=$(mandir)/crude.8 \


Sampo Saaristo's avatar
Sampo Saaristo committed
68
##############################################################################