]> git.proxmox.com Git - vncterm.git/blobdiff - Makefile
build: remove cruft
[vncterm.git] / Makefile
index ecf6b438e34086ce367884f6548fc8cb968d8950..1225390a8f556ad4737acfb04828193864e8c27e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,9 @@
 PACKAGE=vncterm
 # Note: also change version in debian/control and debian/changelog
-VERSION=1.4
-PACKAGERELEASE=2
+VERSION=1.5
+PACKAGERELEASE=3
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell cat .git/refs/heads/master)
-CDATE:=$(shell date +%F)
 
 VNCVER=0.9.11
 VNCREL=LibVNCServer-${VNCVER}
@@ -13,7 +12,10 @@ VNCSRC=${VNCREL}.tar.gz
 VNCLIB=${VNCDIR}/libvncserver/.libs/libvncserver.a
 
 DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
-SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz
+
+CPPFLAGS += -O2 -g -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I $(VNCDIR)
+
+VNC_LIBS := -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng
 
 all: vncterm
 
@@ -25,16 +27,17 @@ genfont2: genfont2.c
        gcc -g -O2 -o $@ genfont2.c -Wall -Wextra -D_GNU_SOURCE -lz
 
 .PHONY: vnc
-${VNCLIB} vnc: ${VNCSRC}
+vnc: ${VNCLIB}
+${VNCLIB}: ${VNCSRC}
        rm -rf ${VNCDIR}
        tar xf ${VNCSRC}
        ln -s ../vncpatches ${VNCDIR}/patches
        cd ${VNCDIR}; quilt push -a
        cd ${VNCDIR}; ./autogen.sh --without-ssl --without-websockets --without-tightvnc-filetransfer;
-       cd ${VNCDIR}; make
+       cd ${VNCDIR}; $(MAKE)
 
-vncterm: vncterm.c ${VNCLIB} wchardata.c
-       gcc -O2 -g -o $@ vncterm.c wchardata.c -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I ${VNCDIR} ${VNCLIB} -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng
+vncterm: vncterm.c wchardata.c $(VNCLIB)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(VNC_LIBS)
 
 wchardata.c:
        cp /usr/share/unifont/$@ $@
@@ -61,9 +64,8 @@ vncterm.1: vncterm.pod
 .PHONY: deb
 deb: $(DEB)
 ${DEB}:
-       make clean
+       $(MAKE) clean
        rsync -a . --exclude build build
-       echo "Architecture: ${ARCH}" >> build/debian/control
        echo "git clone git://git.proxmox.com/git/vncterm.git\\ngit checkout ${GIVERSION}" > build/debian/SOURCE
        cd build; dpkg-buildpackage -rfakeroot -b -us -uc
        lintian ${DEB}  
@@ -78,13 +80,3 @@ clean:
 
 .PHONY: distclean
 distclean: clean
-
-.PHONY: dist
-${SNAP} dist: distclean
-       rm -rf ../${SNAP}
-       cd ..; tar cvzf ${SNAP} --exclude .svn ${PACKAGE}
-       mv ../${SNAP} ${SNAP}
-
-.PHONY: uploaddist
-uploaddist: ${SNAP}
-       scp ${SNAP} pve.proxmox.com:/home/ftp/sources/