From: Matteo Nastasi Date: Thu, 31 Mar 2011 13:35:25 +0000 (+0200) Subject: pkg target and some improvements added X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=makesimple.git;a=commitdiff_plain;h=a8774d20ed3680de4525f687f4776779c727fd79;ds=sidebyside pkg target and some improvements added --- diff --git a/makefile b/makefile index 5fe3e27..d605310 100644 --- a/makefile +++ b/makefile @@ -1,17 +1,24 @@ # # Project #PRJNAME# # + +VER=0.0.1 EXE=#PRJNAME# OBJ=#PRJNAME#.o +PKGNAME=#PRJNAME# +TARGET=$(EXE) CC?=gcc -ALL: #PRJNAME# +ALL: $(TARGET) #PRJNAME#: #PRJNAME#.c #PRJNAME#.h - $(CC) -o #PRJNAME# #PRJNAME#.c + $(CC) -o $@ $< clean: - rm -f $(EXE) $(OBJ) *~ + rm -f $(EXE) $(OBJ) *~ $(TARGET) + +pkg: + tar -zcv --transform="s,^,$(PKGNAME)-$(VER)/," -f ../$(PKGNAME)_$(VER).tgz * -.PHONY: clean ALL +.PHONY: clean pkg ALL