wdvi

network DVI viewer
Log | Files | Refs

Makefile (830B)


      1 PROG =	wdvi
      2 
      3 SRCS =	dvi-draw.c \
      4 	dvi-init.c \
      5 	events.c \
      6 	filefind.c \
      7 	font-open.c \
      8 	ft.c \
      9 	http.c \
     10 	pk.c \
     11 	popups.c \
     12 	special.c \
     13 	util.c \
     14 	vf.c \
     15 	xdvi.c
     16 
     17 PKGS = freetype2 openssl xaw7
     18 PKGS_CFLAGS !=	pkg-config --cflags ${PKGS}
     19 PKGS_LDADD !=	pkg-config --libs ${PKGS}
     20 
     21 CPPFLAGS +=	-MD ${PKGS_CFLAGS}
     22 CFLAGS +=	-Wall -g # -Wshadow
     23 LDFLAGS +=	-Xlinker --allow-multiple-definition
     24 LDADD +=	-lm ${PKGS_LDADD}
     25 
     26 ${PROG}: ${SRCS:.c=.o}
     27 	${CC} ${LDFLAGS} -o ${PROG} ${SRCS:.c=.o} ${LDADD}
     28 
     29 default.h: wdvi.1
     30 	-roff2dvi wdvi.1 > default.dvi && xxd -i default.dvi $@
     31 
     32 install:
     33 	@echo "Not yet."
     34 
     35 clean:
     36 	rm -f ${PROG} ${PROG}.core *.o *.o.tmp *.d
     37 
     38 tags: ${SRCS}
     39 	ctags -d *.c *.h
     40 
     41 analysis:
     42 	make clean
     43 	scan-build make
     44 
     45 # BSD make does not like variable substitution in the -include
     46 DEPENDS = ${SRCS:.c=.d}
     47 
     48 -include ${DEPENDS}