2 # Debug options you can define on the following line:
4 # -DALT_UI -- Select an alternative user interface
5 # that doesn't require curses. This allows
6 # running an egg even if there's a problem
7 # with terminal configuration.
9 # -DDEBUG -- General debug output
11 # -DHEXDUMP -- Dump network packets sent and received
12 # in hexadecimal, identifying the recipient
13 # or sender by IP address. Handy when
14 # tracking down byte alignment problems.
16 # -DNICE=x -- Priority increment (positive value) which
17 # eggsh raises to while collecting data when
18 # run by super-user. Default is 10. Setting
19 # -DNICE=0 disables the priority adjustment
22 # -DNO_UI -- Disable user interface in the egg. This
23 # is handy when you want to watch other
26 # -DPACKETDUMP -- Interpreted dump of packets.
28 # -DSTORAGE_DEBUG -- Debug output from storage.c database
31 # -DTESTPORT -- Use EGGPORT = 2074, BASKETPORT = 2075.
32 # This permits testing an experimental
33 # version of eggsh and basket on a machine
34 # which is running production version(s)
35 # on the standard ports.
37 # -DUSLEEP -- Use a built-in emulation of usleep()
38 # based on setitimer() instead of the
39 # system library function (which may not
40 # exist on all flavours of Unix).
42 #DEBUGOPTIONS = -DDEBUG -DPACKETDUMP -DTESTPORT -DHEXDUMP -DNO_UI -DSTORAGE_DEBUG
44 #DEBUGOPTIONS = -DTESTPORT -DDEBUG -DPACKETDUMP -DNO_UI -DALT_UI
46 #DEBUGOPTIONS = -DTESTPORT
50 #DEBUGOPTIONS = -DTESTPORT -DALT_UI -DNO_UI
52 #DEBUGOPTIONS = -DDEBUG -DALT_UI -DNO_UI
54 #DEBUGOPTIONS = -DDEBUG -DNO_UI -DHEXDUMP
56 # Build for throop/Orion egg
57 #DEBUGOPTIONS = -DNO_UI -DALT_UI -DDEBUG -DUSLEEP -DFLUSH
59 # Current debug options
60 #DEBUGOPTIONS = -DNO_UI -DALT_UI -DDEBUG -DTESTPORT
62 DEBUGOPTIONS = -DREPORT=1 -DEGG_DYNAMIC
66 PFLAGS = -g -ansi -Wall -DLinux -DUSLEEP -D_GNU_SOURCE
69 # For Solaris 2.6 with Sun compiler
71 #PFLAGS = -g -DSolaris
72 #LIBS = -lcurses -lsocket -lnsl
74 # Silicon Graphics Irix 5.3 with SGI compiler. Yes
75 # we do define "Solaris" along with "Irix" for such a build.
77 #PFLAGS = -g -DSolaris -DIrix -DUSLEEP
80 CFLAGS = $(PFLAGS) $(DEBUGOPTIONS)
82 HWOBJ = reg_orion.o reg_pear.o reg_pseudo.o
83 APPOBJ = storage.o network.o crc16.o genlib.o xdsub.o
84 EGGOBJ = egg.o eggui.o lecuyer.o usleep.o
88 PROGRAMS = eggsh basket regtest
92 all: $(PROGRAMS) tarballs
94 eggsh: $(EGGOBJ) $(HWOBJ) $(APPOBJ)
95 $(CC) $(CFLAGS) -o eggsh $(EGGOBJ) $(HWOBJ) $(APPOBJ) $(LIBS)
97 examine: $(APPOBJ) examine.o
98 $(CC) $(CFLAGS) -o examine storage.o crc16.o genlib.o examine.o
100 basket: $(BASKETOBJ) $(APPOBJ)
101 $(CC) $(CFLAGS) -o basket $(BASKETOBJ) $(APPOBJ) $(LIBS)
103 tarballs: $(PROGRAMS)
104 tar czf eggware.tgz sample.eggrc eggsh regtest README
105 tar czf eggsrc.tgz sample.eggrc sample.basketrc $(PROGRAMS) README Makefile *.c *.h
108 eggsh 1 9600 200 10 10
111 rm -f $(PROGRAMS) *.o *.bak .*.bak core dumpreg.dat egg.status eggsample.pid
116 basket.o: basket.c global.h genlib.h storage.h network.h version.h
118 #collect.o: collect.c global.h genlib.h regs.h collect.h
120 egg.o: egg.c global.h genlib.h storage.h network.h regs.h version.h
122 eggui.o: eggui.c global.h genlib.h errnos.h eggui.h regs.h version.h
124 global.h: byteorder.h
126 hw_pear.o: hw_pear.c global.h genlib.h
130 network.o: network.c global.h genlib.h network.h
134 reg_orion.o: reg_orion.c reg.h
136 reg_pear.o: reg_pear.c reg.h
138 reg_pseudo.o: reg_pseudo.c reg.h lecuyer.h
140 storage.o: storage.c global.h genlib.h storage.h