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
|
# Debug options you can define on the following line:
# -DALT_UI -- Select an alternative user interface
# that doesn't require curses. This allows
# running an egg even if there's a problem
# with terminal configuration.
#
# -DDEBUG -- General debug output
#
# -DHEXDUMP -- Dump network packets sent and received
# in hexadecimal, identifying the recipient
# or sender by IP address. Handy when
# tracking down byte alignment problems.
#
# -DNICE=x -- Priority increment (positive value) which
# eggsh raises to while collecting data when
# run by super-user. Default is 10. Setting
# -DNICE=0 disables the priority adjustment
# mechanism.
#
# -DNO_UI -- Disable user interface in the egg. This
# is handy when you want to watch other
# debug output.
#
# -DPACKETDUMP -- Interpreted dump of packets.
#
# -DSTORAGE_DEBUG -- Debug output from storage.c database
# functions.
#
# -DTESTPORT -- Use EGGPORT = 2074, BASKETPORT = 2075.
# This permits testing an experimental
# version of eggsh and basket on a machine
# which is running production version(s)
# on the standard ports.
#
# -DUSLEEP -- Use a built-in emulation of usleep()
# based on setitimer() instead of the
# system library function (which may not
# exist on all flavours of Unix).
#DEBUGOPTIONS = -DDEBUG -DPACKETDUMP -DTESTPORT -DHEXDUMP -DNO_UI -DSTORAGE_DEBUG
#DEBUGOPTIONS = -DTESTPORT -DDEBUG -DPACKETDUMP -DNO_UI -DALT_UI
#DEBUGOPTIONS = -DTESTPORT
#DEBUGOPTIONS =
#DEBUGOPTIONS = -DTESTPORT -DALT_UI -DNO_UI
#DEBUGOPTIONS = -DDEBUG -DALT_UI -DNO_UI
#DEBUGOPTIONS = -DDEBUG -DNO_UI -DHEXDUMP
# Build for throop/Orion egg
#DEBUGOPTIONS = -DNO_UI -DALT_UI -DDEBUG -DUSLEEP -DFLUSH
# Current debug options
#DEBUGOPTIONS = -DNO_UI -DALT_UI -DDEBUG -DTESTPORT
DEBUGOPTIONS = -DREPORT=1 -DEGG_DYNAMIC
# For Linux with GCC
CC = gcc
PFLAGS = -g -ansi -Wall -DLinux -DUSLEEP -D_GNU_SOURCE
LIBS = -lncurses
# For Solaris 2.6 with Sun compiler
#CC = cc
#PFLAGS = -g -DSolaris
#LIBS = -lcurses -lsocket -lnsl
# Silicon Graphics Irix 5.3 with SGI compiler. Yes
# we do define "Solaris" along with "Irix" for such a build.
#CC = cc
#PFLAGS = -g -DSolaris -DIrix -DUSLEEP
#LIBS = -lcurses
CFLAGS = $(PFLAGS) $(DEBUGOPTIONS)
HWOBJ = reg_orion.o reg_pear.o reg_pseudo.o
APPOBJ = storage.o network.o crc16.o genlib.o xdsub.o
EGGOBJ = egg.o eggui.o lecuyer.o usleep.o
BASKETOBJ = basket.o
TESTOBJ = testmain.o
PROGRAMS = eggsh basket regtest
default: $(PROGRAMS)
all: $(PROGRAMS) tarballs
eggsh: $(EGGOBJ) $(HWOBJ) $(APPOBJ)
$(CC) $(CFLAGS) -o eggsh $(EGGOBJ) $(HWOBJ) $(APPOBJ) $(LIBS)
examine: $(APPOBJ) examine.o
$(CC) $(CFLAGS) -o examine storage.o crc16.o genlib.o examine.o
basket: $(BASKETOBJ) $(APPOBJ)
$(CC) $(CFLAGS) -o basket $(BASKETOBJ) $(APPOBJ) $(LIBS)
tarballs: $(PROGRAMS)
tar czf eggware.tgz sample.eggrc eggsh regtest README
tar czf eggsrc.tgz sample.eggrc sample.basketrc $(PROGRAMS) README Makefile *.c *.h
test: eggsh
eggsh 1 9600 200 10 10
clean:
rm -f $(PROGRAMS) *.o *.bak .*.bak core dumpreg.dat egg.status eggsample.pid
cleandata:
rm -rf 199*-*
basket.o: basket.c global.h genlib.h storage.h network.h version.h
#collect.o: collect.c global.h genlib.h regs.h collect.h
egg.o: egg.c global.h genlib.h storage.h network.h regs.h version.h
eggui.o: eggui.c global.h genlib.h errnos.h eggui.h regs.h version.h
global.h: byteorder.h
hw_pear.o: hw_pear.c global.h genlib.h
lecuyer.o: lecuyer.c
network.o: network.c global.h genlib.h network.h
regs.h: reg.h
reg_orion.o: reg_orion.c reg.h
reg_pear.o: reg_pear.c reg.h
reg_pseudo.o: reg_pseudo.c reg.h lecuyer.h
storage.o: storage.c global.h genlib.h storage.h
usleep.o: usleep.c
|