File: Makefile

package info (click to toggle)
icmpush 2.2-6.2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 256 kB
  • sloc: ansic: 1,726; makefile: 78; sh: 24
file content (77 lines) | stat: -rw-r--r-- 1,981 bytes parent folder | download | duplicates (4)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# Makefile for ICMPush v2.2
# Tested on Linux 2.0.35, 2.2.1 (gcc v2.7.2.3) and Solaris 2.5.1 SPARC
# (gcc v2.7.2.3)
#

# Compiler
CC = gcc

# Install directory
INST_DIR  = /usr/local/bin

# English man directory
MAN_DIR = /usr/local/man/man8

# Program Language. 
# If you need spanish uncomment the next variable, else other English.
#LNG = -DSPANISH

# Compiler flags
CCFLAGS = -Wall -O3 $(LNG)

# If you get problems with the message "undefined reference to __inet_aton"
# you has replaced the original "includes" with the "includes" that
# comes with the bind 8.1.2 distribution, then you must put the
# complete path to the library.
# Leave this variable blank else other.
LIBBINDDIR =
# LIBBINDIR = /usr/local/lib/libbind.a


######################################################################
# From here to the end is not necessary to modify. Thanx :)
# 
LIBSOLARIS = -lsocket -lresolv -lnsl
SOURCES = icmpush.c help.c version.c parser.c mtu.c
OBJS =  icmpush.o  help.o version.o parser.o mtu.o
default:
	@echo ""
	@echo "  To compile the ICMPush program for Linuz:"
	@echo "            make linuz"
	@echo ""
	@echo "  To compile the ICMPush program for Solaris:"
	@echo "            make solaris"
	@echo ""
	@echo "  To delete object files, executables and *~:"
	@echo "            make clean"
	@echo ""
	@echo "  To install the ICMPush executable file and the man page:"
	@echo "            make install"
	@echo ""
	@echo "  Enjoy!  ;)"
	@echo ""
	@echo " Slayer."

linuz:	icmp-lin cuenta-prog

icmp-lin:	
	$(CC)  $(CCFLAGS) -DLINUX -D_BIT_FIELDS_LTOH -c $(SOURCES)
	$(CC)  $(CCFLAGS) -o  icmpush   $(OBJS)   $(LIBBINDDIR)

cuenta-prog:	
	$(CC)  $(CCFLAGS) -c  cuenta.c
	$(CC)  $(CCFLAGS) -o  cuenta   cuenta.o

solaris:	icmp-sol cuenta-prog

icmp-sol:	
	$(CC)  $(CCFLAGS) -DSOLARIS -c  $(SOURCES)
	$(CC)  $(CCFLAGS) -o  icmpush  $(OBJS)  $(LIBBINDDIR)  $(LIBSOLARIS)

install:
	cp icmpush $(INST_DIR)
	cp icmpush.8 $(MAN_DIR)

clean:	
	@rm -f icmpush cuenta *.o *~