nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

Makefile (1794B)


      1 # Tests require
      2 # 1. <https://pkg-config.freedesktop.org>
      3 #    (or <https://github.com/pkgconf/pkgconf>)
      4 # 2. <https://libcheck.github.io/check/>
      5 
      6 SHELL=/bin/sh
      7 
      8 default: it
      9 
     10 .PHONY: clean default it test
     11 
     12 TESTBINS = unittest_stralloc unittest_blast unittest_prioq
     13 
     14 clean:
     15 	rm -f $(TESTBINS) *.o blast.c
     16 
     17 it: $(TESTBINS)
     18 
     19 test: it
     20 	@for tbin in $(TESTBINS); do \
     21 		./$$tbin || exit 1 ; \
     22 	done
     23 
     24 unittest_stralloc: \
     25 ../load unittest_stralloc.o ../stralloc.a ../str.a ../error.a
     26 	../load unittest_stralloc ../stralloc.a ../str.a ../error.a \
     27 	`pkg-config --libs check`
     28 
     29 unittest_stralloc.o: \
     30 ../compile unittest_stralloc.c ../alloc.h ../stralloc.h
     31 	../compile unittest_stralloc.c -I.. \
     32 	`pkg-config --cflags check`
     33 
     34 blast.c: ../qmail-remote.c
     35 	`head -n $$(grep -n '^int main(' ../qmail-remote.c | sed 's/:.*//') ../qmail-remote.c | sed '/^int main(/d' > blast.c`
     36 
     37 blast.o: ../compile blast.c
     38 	../compile blast.c -I..
     39 
     40 unittest_blast: \
     41 ../load unittest_blast.o blast.o ../control.o ../ip.o ../constmap.o \
     42 ../timeoutread.o ../timeoutwrite.o ../quote.o \
     43 ../stralloc.a ../str.a ../error.a ../substdio.a ../fs.a ../open.a ../str.a \
     44 ../getln.a ../case.a
     45 	../load unittest_blast blast.o ../control.o ../ip.o ../constmap.o \
     46 	../timeoutread.o ../timeoutwrite.o ../quote.o \
     47 	../stralloc.a ../str.a ../error.a ../substdio.a ../fs.a ../open.a \
     48 	../getln.a ../str.a ../case.a \
     49 	`pkg-config --libs check`
     50 
     51 unittest_blast.o: \
     52 ../compile unittest_blast.c ../alloc.h ../stralloc.h
     53 	../compile unittest_blast.c -I.. \
     54 	`pkg-config --cflags check`
     55 
     56 unittest_prioq: \
     57 ../load unittest_prioq.o ../prioq.o ../error.a
     58 	../load unittest_prioq ../prioq.o ../error.a \
     59 	`pkg-config --libs check`
     60 
     61 unittest_prioq.o: \
     62 ../compile unittest_prioq.c
     63 	../compile unittest_prioq.c -I.. \
     64 	`pkg-config --cflags check`