summary refs log blame commit diff
path: root/Makefile
blob: 978af4056516c4f793c703438f3d29fff4f90cb6 (plain) (tree)
1
2
3
4
5
6
7
8
9

                          
                            
 
                                           

                                               
              
                  
                 
              
                
                
                
              
              
              
               
                  
 


             

                                                
                         
 

                        
      
                                 








                                                                  
PREFIX = /usr/local
SHAREDIR = ${PREFIX}/share
MANDIR = ${SHAREDIR}/man
LIBRESSL_PREFIX = /usr/local

CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
# XXX: avoid iconv.h from libiconv
CFLAGS += -idirafter ${LIBRESSL_PREFIX}/include
LDFLAGS += -L${LIBRESSL_PREFIX}/lib
LDLIBS = -ltls

-include config.mk

OBJS += archive.o
OBJS += atom.o
OBJS += concat.o
OBJS += decode.o
OBJS += export.o
OBJS += html.o
OBJS += imap.o
OBJS += mbox.o
OBJS += parse.o
OBJS += template.o

dev: tags all

all: bubger

bubger: ${OBJS}
	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@

${OBJS}: archive.h imap.h

tags: *.c *.h
	ctags -w *.c *.h

clean:
	rm -f bubger ${OBJS} tags

install: bubger bubger.1 default.html
	install -d ${PREFIX}/bin ${MANDIR}/man1 ${SHAREDIR}/bubger
	install bubger ${PREFIX}/bin
	gzip -c bubger.1 > ${MANDIR}/man1/bubger.1.gz
	install -m 644 default.html ${SHAREDIR}/bubger

uninstall:
	rm -f ${PREFIX}/bin/bubger ${MANDIR}/man1/bubger.1.gz
	rm -fr ${SHAREDIR}/bubger