[c5c522c] | 1 | include Makefile.config |
---|
| 2 | |
---|
| 3 | ######################################################################## |
---|
| 4 | # Please edit Makefile.config to configure LCDproc for your system. |
---|
| 5 | ######################################################################## |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | ######################################################################## |
---|
| 9 | # You shouldn't need to touch anything below here. |
---|
| 10 | ######################################################################## |
---|
| 11 | |
---|
| 12 | #GCC = gcc -Wall -Wp -O6 |
---|
| 13 | DIRS = shared clients/lcdproc clients server/drivers server |
---|
| 14 | TARGETS = server clients shared |
---|
| 15 | SOURCES = Makefile \ |
---|
| 16 | shared/Makefile \ |
---|
| 17 | shared/LL.c shared/LL.h \ |
---|
| 18 | shared/config.c shared/config.h \ |
---|
| 19 | shared/sockets.c shared/sockets.h \ |
---|
| 20 | clients/Makefile \ |
---|
| 21 | clients/mode.c clients/mode.h \ |
---|
| 22 | tests/Makefile \ |
---|
| 23 | server/Makefile \ |
---|
| 24 | server/main.c server/main.h \ |
---|
| 25 | server/lcd.c server/lcd.h \ |
---|
| 26 | server/drv_base.c server/drv_base.h \ |
---|
| 27 | server/drivers/MtxOrb.c server/drivers/MtxOrb.h \ |
---|
| 28 | server/drivers/wirz-sli.c server/drivers/wirz-sli.h \ |
---|
| 29 | server/drivers/text.c server/drivers/text.h \ |
---|
| 30 | server/drivers/debug.c server/drivers/debug.h \ |
---|
| 31 | server/drivers/curses_drv.c server/drivers/curses_drv.h \ |
---|
| 32 | server/drivers/hd44780.c server/drivers/hd44780.h server/drivers/port.h |
---|
| 33 | EXTRAS = WHATSNEW INSTALL README COPYING TODO README.IRman \ |
---|
| 34 | docs/menustuff.txt docs/netstuff.txt docs/README.dg \ |
---|
| 35 | docs/README.dg2 docs/hd44780_howto.txt |
---|
| 36 | DOCS = docs/lcdproc.1 |
---|
| 37 | #MISC += $(OS) $(DRIVERS) |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | ################################################################### |
---|
| 42 | # Compilation... |
---|
| 43 | # |
---|
| 44 | |
---|
| 45 | # TODO: Make sure lcdproc is configured first... |
---|
| 46 | #@NOTCONFIGURED=`find . -newer . -name Makefile.config` |
---|
| 47 | #@if [ $(NOTCONFIGURED) ]; do \ |
---|
| 48 | # echo Please configure lcdproc before compiling! ;\ |
---|
| 49 | # echo Edit "Makefile.config" to configure. ;\ |
---|
| 50 | # exit 0 ;\ |
---|
| 51 | #@done; |
---|
| 52 | all: |
---|
| 53 | @echo Compiling LCDproc... |
---|
| 54 | @for i in $(DIRS); do \ |
---|
| 55 | (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ |
---|
| 56 | done; true |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | server: |
---|
| 60 | cd server; $(MAKE) |
---|
| 61 | |
---|
| 62 | clients: |
---|
| 63 | cd clients; $(MAKE) |
---|
| 64 | |
---|
| 65 | shared: |
---|
| 66 | cd shared; $(MAKE) |
---|
| 67 | |
---|
| 68 | tests: |
---|
| 69 | cd tests; $(MAKE) |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | ################################################################## |
---|
| 73 | # Installation |
---|
| 74 | # |
---|
| 75 | install: $(TARGETS) $(DOCS) |
---|
| 76 | @echo Installing LCDproc... |
---|
| 77 | # @echo Sorry! Cannot do that yet... |
---|
| 78 | # @echo Please read INSTALL for instructions |
---|
| 79 | @for i in $(DIRS); do \ |
---|
| 80 | (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ |
---|
| 81 | done; true |
---|
| 82 | if [ ! -e /dev/lcd ]; then ln -s $(DEVICE) /dev/lcd ; chmod a+rw $(DEVICE) ; fi |
---|
| 83 | @echo "All done -- enjoy!" |
---|
| 84 | @echo "Be sure to verify that /dev/lcd points to the correct device." |
---|
| 85 | @ls -l /dev/lcd |
---|
| 86 | |
---|
| 87 | # TODO: Have the installer insert lcdproc in system startup scripts? |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | ################################################################## |
---|
| 91 | # Other stuff... |
---|
| 92 | # |
---|
| 93 | clean: |
---|
| 94 | @for i in $(DIRS); do \ |
---|
| 95 | (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ |
---|
| 96 | done |
---|
| 97 | rm -f *~ core |
---|
| 98 | |
---|
| 99 | # Distribution file |
---|
| 100 | dist: |
---|
| 101 | @echo Making distributable tarball... |
---|
| 102 | make clean |
---|
| 103 | rm -rf lcdproc-$(VERSION) |
---|
| 104 | rm -rf lcdproc-$(VERSION).tar.gz |
---|
| 105 | mkdir lcdproc-$(VERSION) |
---|
| 106 | tar cBf - . --exclude CVS --exclude lcdproc-$(VERSION) | (cd lcdproc-$(VERSION) && tar xBfv -) |
---|
| 107 | tar cfv lcdproc-$(VERSION).tar lcdproc-$(VERSION) |
---|
| 108 | gzip lcdproc-$(VERSION).tar |
---|
| 109 | rm -rf lcdproc-$(VERSION) |
---|
| 110 | |
---|
| 111 | # This includes source... |
---|
| 112 | #tarball: |
---|
| 113 | # tar cfv lcd.tar . |
---|
| 114 | # gzip lcd.tar |
---|
| 115 | |
---|
| 116 | edit: |
---|
| 117 | emacs . & |
---|
| 118 | |
---|
| 119 | .PHONY : todo |
---|
| 120 | todo : |
---|
| 121 | @echo ---------------=========================================== |
---|
| 122 | @grep -n TODO\\\|FIXME `find . -type f` | grep -v grep |
---|
| 123 | @echo ---------------=========================================== |
---|
| 124 | |
---|
| 125 | #todo: |
---|
| 126 | # @echo ---------------=========================================== |
---|
| 127 | # @grep TODO $(SOURCES) | grep -v SOURCES |
---|
| 128 | # @grep FIXME $(SOURCES) | grep -v SOURCES |
---|
| 129 | # @echo ---------------=========================================== |
---|
| 130 | |
---|
| 131 | #TODO: Keep updating the "Thank You's" section of the README. |
---|
| 132 | #TODO: Don't forget about homework! |
---|
| 133 | |
---|