chiark / gitweb /
add with-lock-ex to new chiark-utils-bin package
[chiark-utils.git] / cprogs / Makefile
index 2066d60..fc4b4dc 100644 (file)
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-CC=            gcc
-CFLAGS=                $(WARNINGS) $(OPTIMISE) $(DEBUG)
-CPPFLAGS=      -DRWBUFFER_SIZE_MB=$(RWBUFFER_SIZE_MB)
+include ../settings.make
 
-WARNINGS=      -Wall -Wwrite-strings -Wmissing-prototypes \
-               -Wstrict-prototypes -Wpointer-arith
-OPTIMISE=      -O2
-DEBUG=         -g
 RWBUFFER_SIZE_MB=16
 
-SYSTEM_GROUP=  root
+PROGRAMS=              readbuffer writebuffer with-lock-ex
+SUIDSBINPROGRAMS=      really
+DAEMONS=               trivsoundd
+MAN1PAGES=             readbuffer.1 writebuffer.1
+MAN8PAGES=             trivsoundd.8 really.8
 
-prefix=/usr/local
-
-bindir=$(prefix)/bin
-sbindir=$(prefix)/sbin
-mandir=${prefix}/man
-man1dir=${mandir}/man1
-man8dir=${mandir}/man8
-
-INSTALL=               install -c
-INSTALL_PROGRAM=       $(INSTALL_SCRIPT) -s
-
-PROGRAMS=      readbuffer writebuffer
-DAEMONS=       trivsoundd
-MAN1PAGES=     readbuffer.1 writebuffer.1
-MAN8PAGES=     trivsoundd.8
-
-TARGETS=       $(PROGRAMS) $(DAEMONS)
+TARGETS=       $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS)
 
 all:           $(TARGETS)
 
 readbuffer:                    readbuffer.o                    rwbuffer.o
 writebuffer:                   writebuffer.o   wrbufcore.o     rwbuffer.o 
 trivsoundd:                    trivsoundd.o    wrbufcore.o     rwbuffer.o 
-readbuffer.o writebuffer.o rwbuffer.o wrbufcoore.o:    rwbuffer.h
+really:                                really.o myopt.o
+
+really.o myopt.o: myopt.h
+readbuffer.o writebuffer.o rwbuffer.o wrbufcore.o trivsoundd.o:        rwbuffer.h
 
 install:               all
                $(INSTALL_DIRECTORY) $(bindir) $(sbindir)
                $(INSTALL_PROGRAM) $(PROGRAMS) $(bindir)
                $(INSTALL_PROGRAM) $(DAEMONS) $(sbindir)
+               $(INSTALL) -m 4774 -o root -g $(SYSTEM_GROUP) \
+                       $(SUIDSBINPROGRAMS) $(sbindir)
 
 install-docs:
                $(INSTALL_DIRECTORY) $(man1dir) $(man8dir) $(txtdocdir)