-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
executable file
·120 lines (114 loc) · 3.19 KB
/
Makefile
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
# Makefile for NETIO
#
# Author: Kai Uwe Rommel <[email protected]>
# Created: Wed Sep 25 1996
#
# $Id: Makefile,v 1.11 2012/12/11 20:53:23 Rommel Exp $
# $Revision: 1.11 $
#
# $Log: Makefile,v $
# Revision 1.11 2012/12/11 20:53:23 Rommel
# added amiga target from Christian Euler <[email protected]>
#
# Revision 1.10 2010/10/14 13:03:35 Rommel
# removed NetBIOS code
#
# Revision 1.9 2005/08/30 14:45:58 Rommel
# targets updated
#
# Revision 1.8 2003/08/17 16:59:22 Rommel
# separated Unix and Linux targets
#
# Revision 1.7 2003/07/12 17:28:31 Rommel
# switched to gcc for Win32
#
# Revision 1.6 2001/04/19 12:21:14 Rommel
# added fixes for Unix systems
#
# Revision 1.5 1999/10/24 19:08:49 rommel
# imported DOS support from G. Vanem <[email protected]>
#
# Revision: 1.5 1999/10/12 11:02:00 giva
# added Watt-32 + djgpp support
#
# $Log: Makefile,v $
# Revision 1.11 2012/12/11 20:53:23 Rommel
# added amiga target
#
# Revision 1.10 2010/10/14 13:03:35 Rommel
# removed NetBIOS code
#
# Revision 1.9 2005/08/30 14:45:58 Rommel
# targets updated
#
# Revision 1.8 2003/08/17 16:59:22 Rommel
# separated Unix and Linux targets
#
# Revision 1.1 2003/08/17 16:58:28 Rommel
# Initial revision
#
# Revision 1.7 2003/07/12 17:28:31 Rommel
# switched to gcc for Win32
#
# Revision 1.6 2001/04/19 12:21:14 Rommel
# added fixes for Unix systems
#
# Revision 1.5 1999/10/24 19:08:49 rommel
# imported DOS support from G. Vanem <[email protected]>
#
# Revision 1.4 1999/06/13 18:53:42 rommel
# added Linux port
#
# Revision 1.3 1998/10/12 11:14:58 rommel
# change to malloc'ed (and tiled) memory for transfer buffers
# (hint from Guenter Kukkukk <[email protected]>)
# for increased performance
#
# Revision 1.2 1998/07/31 14:16:06 rommel
# *** empty log message ***
#
# Revision 1.1 1998/01/03 17:30:01 rommel
# Initial revision
#
win32:
$(MAKE) all CC="gcc -O -s" O=.o X=.exe \
CFLAGS="-DWIN32" LFLAGS="" \
LIBS="-lwsock32 -lnetapi32" OUT=-o
win32-debug:
$(MAKE) all CC="gcc -g" O=.o X=.exe \
CFLAGS="-DWIN32" LFLAGS="" \
LIBS="-lwsock32 -lnetapi32" OUT=-o
os2:
$(MAKE) all CC="icc -q -Gm -Gt -O" O=.obj X=.exe \
CFLAGS="-DOS2 -Ic:/os2tk45/h/stack16" \
LFLAGS="/B/ST:0x100000" LIBS="tcp32dll.lib so32dll.lib" OUT=-Fe
unix:
$(MAKE) all CC="gcc -O -s" O=.o X= \
CFLAGS="-DUNIX" LFLAGS="" LIBS="-lsocket -lpthread" OUT=-o
solaris:
$(MAKE) all CC="gcc -O -s" O=.o X= \
CFLAGS="-DUNIX" LFLAGS="" LIBS="-lsocket -lpthread -lnsl" OUT=-o
linux:
$(MAKE) all CC="gcc -O -s" O=.o X= \
CFLAGS="-DUNIX" LFLAGS="" LIBS="-lpthread" OUT=-o
macosx:
$(MAKE) all CC="gcc -O" O=.o X= \
CFLAGS="-DUNIX -DSOCKLEN_T" LFLAGS="" LIBS="-lpthread" OUT=-o
freebsd:
$(MAKE) all CC="gcc -O -s" O=.o X= \
CFLAGS="-DUNIX" LFLAGS="-L/usr/local/lib" LIBS="-lpthread" OUT=-o
amiga68k:
$(MAKE) all CC="gcc -IADE:netinclude " O=.o X= \
CFLAGS="-DUNIX -m68020" LFLAGS="-LADE:lib" LIBS="-lpthread" OUT=-o
linux-static:
$(MAKE) all CC="$(CC) -O -s" O=.o X= \
CFLAGS="-DUNIX" LFLAGS="-static" LIBS="-lpthread" OUT=-o
INC = -I.
all: netio$X
netio$X: netio$O getopt$O
$(CC) $(OUT) $@ netio$O getopt$O $(LFLAGS) $(LIBS)
.SUFFIXES: .c $O
.c$O:
$(CC) $(CFLAGS) $(INC) -c $*.c
netio$O: netio.c getopt.h
getopt$O: getopt.c getopt.h