Merge pull request #2 from apeschel/autotools
[apeschel] Made project more in line with Autotools standard.
This commit is contained in:
commit
584fb40b7d
37
Makefile
37
Makefile
@ -1,2 +1,35 @@
|
|||||||
nyancat: nyancat.c
|
package = nyancat
|
||||||
gcc -o nyancat nyancat.c
|
version = 0.1
|
||||||
|
tarname = $(package)
|
||||||
|
distdir = $(tarname)-$(version)
|
||||||
|
|
||||||
|
all clean check parser:
|
||||||
|
cd src && $(MAKE) $@
|
||||||
|
|
||||||
|
dist: $(distdir).tar.gz
|
||||||
|
|
||||||
|
$(distdir).tar.gz: $(distdir)
|
||||||
|
tar chof - $(distdir) | gzip -9 -c > $@
|
||||||
|
rm -rf $(distdir)
|
||||||
|
|
||||||
|
$(distdir): FORCE
|
||||||
|
mkdir -p $(distdir)/src
|
||||||
|
cp Makefile $(distdir)
|
||||||
|
cp src/Makefile $(distdir)/src
|
||||||
|
cp src/nyancat.c $(distdir)/src
|
||||||
|
cp src/nyancat.py $(distdir)/src
|
||||||
|
cp src/telnetsrvlib.py $(distdir)/src
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
-rm $(distdir).tar.gz >/dev/null 2>&1
|
||||||
|
-rm -rf $(distdir) >/dev/null 2>&1
|
||||||
|
|
||||||
|
distcheck: $(distdir).tar.gz
|
||||||
|
gzip -cd $(distdir).tar.gz | tar xvf -
|
||||||
|
cd $(distdir) && $(MAKE) all
|
||||||
|
cd $(distdir) && $(MAKE) check
|
||||||
|
cd $(distdir) && $(MAKE) clean
|
||||||
|
rm -rf $(distdir)
|
||||||
|
@echo "*** Package $(distdir).tar.gz is ready for distribution."
|
||||||
|
|
||||||
|
.PHONY: FORCE all clean check dist distcheck
|
||||||
|
15
src/Makefile
Normal file
15
src/Makefile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
OBJECTS = nyancat.o
|
||||||
|
|
||||||
|
all: nyancat
|
||||||
|
|
||||||
|
nyancat: $(OBJECTS)
|
||||||
|
$(CC) $(LFLAGS) $(OBJECTS) -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-rm -f $(OBJECTS) nyancat
|
||||||
|
|
||||||
|
check: all
|
||||||
|
# Unit tests go here. None currently.
|
||||||
|
@echo "*** ALL TESTS PASSED ***"
|
||||||
|
|
||||||
|
.PHONY: all clean check
|
Loading…
Reference in New Issue
Block a user