File: Makefile

package info (click to toggle)
socket 1.1-10
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 128 kB
  • ctags: 81
  • sloc: ansic: 947; makefile: 159; sh: 18
file content (179 lines) | stat: -rw-r--r-- 4,554 bytes parent folder | download | duplicates (3)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Makefile for Socket
#
# $Header: Makefile[1.23] Wed Sep  9 19:03:26 1992 nickel@cs.tu-berlin.de proposed $
#

### adjust these to your taste
### This is set up to install socket as /usr/local/bin/socket and
### socket.1 in /usr/local/man/man1/socket.1
### Make sure the target directories exist before doing a "make install".

INSTALLBASE = $(DESTDIR)/usr
INSTALLBINPATH = $(INSTALLBASE)/bin
INSTALLBINMODE = 755
INSTALLMANPATH = $(INSTALLBASE)/man
INSTALLMANMODE = 644
CC = cc
CFLAGS  = $(SWITCHES) -O2
LDFLAGS = $(SWITCHES) -s

### You may need to uncomment some lines below for your operating
### system:

### 4.3 BSD:
# SWITCHES = -DNOSETSID

### HP-UX:
# SYSLIBS  = -lBSD

### ISC 3.0:
# SYSLIBS  = -linet -lcposix
# SWITCHES = -DISC

### System V Rel. 4:
# SYSLIBS  = -lc -lsocket -lnsl -L/usr/ucblib -lucb
# SWITCHES = -I/usr/ucbinclude

### Sequent:
# SYSLIBS  = -lseq
# SWITCHES = -Dstrrchr=rindex -DSEQUENT -DNOSETSID
### (I have been reported troubles with the "installmanuals" target on
### a Sequent, so you might have to copy the manual page yourself.)

### CDC 4680 EP/IX: (I know it *has* setsid(2), but not with bsd43)
# SWITCHES = -systype bsd43 -DNOSETSID



### It should not be necessary to change anything below this line.
##################################################################

MAKE = make
SHELL = /bin/sh
BASE = /home/stone/nickel/src
NODEPATH = socket
NODENAME = "Socket"
TARGET = socket
VERSIONFILE = 	so_release.c
VERSIONOBJECT =	so_release.o
PROGSOURCES = socket.c siglist.c io.c utils.c socketp.c
SOURCES = BLURB README COPYRIGHT INSTALL CHANGES \
	socket.1 \
	$(PROGSOURCES) \
	rfinger.sh fingerd.sh
HEADERS = globals.h patchlevel.h
MANUALS = $(MAN1)
MAN1 = socket.1
COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Makefile Dependencies
OBJECTS = $(VERSIONOBJECT) socket.o siglist.o io.o utils.o socketp.o

all: +all $(ALLTARGETS)

targets: $(TARGET)

$(TARGET): $(LOCALLIBS) $(OBJECTS)
	$(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS)

tags: TAGS
TAGS: $(PROGSOURCES) $(HEADERS)
	etags $(PROGSOURCES) $(HEADERS)

installtargets: $(INSTALLBINPATH)/$(TARGET)

$(INSTALLBINPATH)/$(TARGET): $(TARGET)
	@-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \
	if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \
	   [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \
	then \
	  chmod u+w $(INSTALLBINPATH)/$(TARGET); \
	fi; \
	cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \
	chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET)

installmanuals: $(MANUALS)
	@-_manuals="$(MAN1)"; \
	for i in $$_manuals; \
	do \
	  echo "installing $$i in $(INSTALLMANPATH)/man1"; \
	  if [ -f $(INSTALLMANPATH)/man1/$$i ] && \
	     [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \
	  then \
	    chmod u+w $(INSTALLMANPATH)/man1/$$i; \
	  fi; \
	  cp $$i $(INSTALLMANPATH)/man1/$$i; \
	  chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \
	done

doclean:
	rm -f $(TARGET) $(ALIASES) $(OBJECTS) core *~

##
## following internals of shapeTools Release Management System

subsystems: # none

install: +install $(ALLTARGETS)

clean: +clean $(ALLTARGETS)

+all:
	@-if [ -n "$(ALLTARGETS)" ]; \
	then : ; \
	else \
	  $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \
		BASE=$(BASE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		MAKE="$(MAKE)" \
		SHELL="$(SHELL)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		SYSLIBS="$(SYSLIBS)" all; \
	fi

+install:
	@-if [ -n "$(ALLTARGETS)" ]; \
	then : ; \
	else \
	  $(MAKE) ALLTARGETS="subsystems installtargets" \
		MAINTARGET=install \
		BASE=$(BASE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		MAKE="$(MAKE)" \
		SHELL="$(SHELL)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		SYSLIBS="$(SYSLIBS)" install; \
	fi

+clean:
	@-if [ -n "$(ALLTARGETS)" ]; \
	then : ; \
	else \
	  $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \
		BASE=$(BASE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		INCLUDEPATH=$(INCLUDEPATH) \
		MAKE="$(MAKE)" \
		SHELL="$(SHELL)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		SYSLIBS="$(SYSLIBS)" clean; \
	fi