1#Makefile for embedded Kermit. 2# 3# Copyright (C) 1995, 2011, 4# Trustees of Columbia University in the City of New York. 5# All Rights Reserved. See kermit.c for license. 6 7OBJS= main.o kermit.o unixio.o 8EK = makewhat 9ALL = $(EK) 10 11all: $(ALL) 12 13ek: $(OBJS) 14 $(CC) $(CFLAGS) -o ek $(OBJS) 15 16#Dependencies 17 18main.o: main.c cdefs.h debug.h kermit.h platform.h 19 20kermit.o: kermit.c cdefs.h debug.h kermit.h 21 22unixio.o: unixio.c cdefs.h debug.h platform.h kermit.h 23 24#Targets 25 26#Build with cc. 27cc: 28 make ek 29 30#Build with gcc. 31gcc: 32 @UNAME=`uname` ; make "CC=gcc" "CC2=gcc" "CFLAGS=-D$$UNAME -O2" ek 33 34#Ditto but no debugging. 35gccnd: 36 make "CC=gcc" "CC2=gcc" "CFLAGS=-DNODEBUG -O2" ek 37 38#Build with gcc, Receive-Only, minimum size and features. 39gccmin: 40 make "CC=gcc" "CC2=gcc" \ 41 "CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -O2" ek 42 43#Ditto but Receive-Only: 44gccminro: 45 make "CC=gcc" "CC2=gcc" \ 46 "CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -DRECVONLY -O2" ek 47 48#Minimum size, receive-only, but with debugging: 49gccminrod: 50 make "CC=gcc" "CC2=gcc" \ 51 "CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -DRECVONLY -DDEBUG -O2" ek 52 53#HP-UX 9.0 or higher with ANSI C. 54hp: 55 make "SHELL=/usr/bin/sh" CC=/opt/ansic/bin/cc CC2=/opt/ansic/bin/cc \ 56 ek "CFLAGS=-DHPUX -Aa" 57 58#To get profile, build this target, run it, then "gprof ./ek > file". 59gprof: 60 make "CC=gcc" "CC2=gcc" ek "CFLAGS=-DNODEBUG -pg" "LNKFLAGS=-pg" 61 62clean: 63 rm -f $(OBJS) core 64 65makewhat: 66 @echo 'Defaulting to gcc...' 67 make gcc 68 69#End of Makefile 70