blob: 9bd1a257b1b9058b8bca0dae17775b1088ac0991 (
plain) (
blame)
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
|
#Makefile for embedded Kermit.
#
# Copyright (C) 1995, 2011,
# Trustees of Columbia University in the City of New York.
# All Rights Reserved. See kermit.c for license.
OBJS= main.o kermit.o unixio.o
EK = makewhat
ALL = $(EK)
all: $(ALL)
ek: $(OBJS)
$(CC) $(CFLAGS) -o ek $(OBJS)
#Dependencies
main.o: main.c cdefs.h debug.h kermit.h platform.h
kermit.o: kermit.c cdefs.h debug.h kermit.h
unixio.o: unixio.c cdefs.h debug.h platform.h kermit.h
#Targets
#Build with cc.
cc:
make ek
#Build with gcc.
gcc:
@UNAME=`uname` ; make "CC=gcc" "CC2=gcc" "CFLAGS=-D$$UNAME -O0 -ggdb -Wall" ek
#Ditto but no debugging.
gccnd:
make "CC=gcc" "CC2=gcc" "CFLAGS=-DNODEBUG -O2" ek
#Build with gcc, Receive-Only, minimum size and features.
gccmin:
make "CC=gcc" "CC2=gcc" \
"CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -O2" ek
#Ditto but Receive-Only:
gccminro:
make "CC=gcc" "CC2=gcc" \
"CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -DRECVONLY -O2" ek
#Minimum size, receive-only, but with debugging:
gccminrod:
make "CC=gcc" "CC2=gcc" \
"CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -DRECVONLY -DDEBUG -O2" ek
#HP-UX 9.0 or higher with ANSI C.
hp:
make "SHELL=/usr/bin/sh" CC=/opt/ansic/bin/cc CC2=/opt/ansic/bin/cc \
ek "CFLAGS=-DHPUX -Aa"
#To get profile, build this target, run it, then "gprof ./ek > file".
gprof:
make "CC=gcc" "CC2=gcc" ek "CFLAGS=-DNODEBUG -pg" "LNKFLAGS=-pg"
clean:
rm -f $(OBJS) ek core
makewhat:
@echo 'Defaulting to gcc...'
make gcc
#End of Makefile
|