home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ek17.zip / makefile < prev    next >
Makefile  |  2011-03-30  |  2KB  |  70 lines

  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.  
  7. OBJS= main.o kermit.o unixio.o
  8. EK = makewhat
  9. ALL = $(EK)
  10.  
  11. all: $(ALL)
  12.  
  13. ek: $(OBJS)
  14.     $(CC) $(CFLAGS) -o ek $(OBJS)
  15.  
  16. #Dependencies
  17.  
  18. main.o: main.c cdefs.h debug.h kermit.h platform.h
  19.  
  20. kermit.o: kermit.c cdefs.h debug.h kermit.h
  21.  
  22. unixio.o: unixio.c cdefs.h debug.h platform.h kermit.h
  23.  
  24. #Targets
  25.  
  26. #Build with cc.
  27. cc:
  28.     make ek
  29.  
  30. #Build with gcc.
  31. gcc:
  32.     @UNAME=`uname` ; make "CC=gcc" "CC2=gcc" "CFLAGS=-D$$UNAME -O2" ek
  33.  
  34. #Ditto but no debugging.
  35. gccnd:
  36.     make "CC=gcc" "CC2=gcc" "CFLAGS=-DNODEBUG -O2" ek
  37.  
  38. #Build with gcc, Receive-Only, minimum size and features.
  39. gccmin:
  40.     make "CC=gcc" "CC2=gcc" \
  41.     "CFLAGS=-DMINSIZE -DOBUFLEN=256 -DFN_MAX=16 -O2" ek
  42.  
  43. #Ditto but Receive-Only:
  44. gccminro:
  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:
  49. gccminrod:
  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.
  54. hp:
  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".
  59. gprof:
  60.     make "CC=gcc" "CC2=gcc" ek "CFLAGS=-DNODEBUG -pg" "LNKFLAGS=-pg"
  61.  
  62. clean:
  63.     rm -f $(OBJS) core
  64.  
  65. makewhat:
  66.     @echo 'Defaulting to gcc...'
  67.     make gcc
  68.  
  69. #End of Makefile
  70.