working on Makefile
This commit is contained in:
parent
b77b122041
commit
1e4b4d0096
108
Makefile
108
Makefile
@ -70,13 +70,12 @@ calculate: libstr sysexits src/calculate.c
|
||||
$(CC) $(CFLAGS) -o src/calculate.o -c src/calculate.c
|
||||
$(CC) $(CFLAGS) -o bin/calculate lib/libstr.o src/calculate.o
|
||||
|
||||
echo: bin/echo
|
||||
.PHONY: echo
|
||||
echo: bin/$@
|
||||
|
||||
bin/echo: echo/echo
|
||||
cp echo/echo bin/echo
|
||||
|
||||
echo/echo: echo/Makefile echo/echo.c
|
||||
bin/echo: echo/Makefile echo/echo.c
|
||||
$(MAKE) -C echo sane
|
||||
cp echo/echo bin/echo
|
||||
|
||||
false: src/false.c
|
||||
$(CC) $(CFLAGS) -o bin/false src/false.c
|
||||
@ -90,13 +89,12 @@ levenshtein: src/levenshtein.c
|
||||
lowercase: sysexits src/lowercase.c
|
||||
$(CC) $(CFLAGS) -o bin/lowercase src/lowercase.c
|
||||
|
||||
nonzero: bin/nonzero
|
||||
.PHONY: nonzero
|
||||
nonzero: bin/$@
|
||||
|
||||
bin/nonzero: nonzero/nonzero
|
||||
cp nonzero/nonzero bin/nonzero
|
||||
|
||||
nonzero/nonzero: nonzero/Makefile nonzero/nonzero.c
|
||||
bin/nonzero: nonzero/Makefile nonzero/nonzero.c
|
||||
$(MAKE) -C nonzero sane
|
||||
cp nonzero/nonzero bin/nonzero
|
||||
|
||||
nutshell.o: libio usefulmacros src/nutshell.c src/nutshell.h src/nutshell_builtins.c
|
||||
$(CC) $(CFLAGS) -c -o build/nutshell.o src/nutshell.c
|
||||
@ -104,13 +102,12 @@ nutshell.o: libio usefulmacros src/nutshell.c src/nutshell.h src/nutshell_builti
|
||||
nutshell: libio nutshell.o
|
||||
$(CC) $(CFLAGS) -o bin/nutshell build/libio.o build/nutshell.o
|
||||
|
||||
.PHONY: pscat
|
||||
pscat: bin/pscat
|
||||
|
||||
bin/pscat: pscat/pscat
|
||||
cp pscat/pscat bin/pscat
|
||||
|
||||
pscat/pscat: sysexits pscat/pscat.c pscat/Makefile
|
||||
bin/pscat: sysexits pscat/pscat.c pscat/Makefile
|
||||
$(MAKE) -C pscat sane
|
||||
cp pscat/pscat bin/pscat
|
||||
|
||||
retval.o: libio src/retval.c sysexits
|
||||
$(CC) $(CFLAGS) -c -o build/retval.o src/retval.c
|
||||
@ -118,21 +115,19 @@ retval.o: libio src/retval.c sysexits
|
||||
retval: libio retval.o
|
||||
$(CC) $(CFLAGS) -o bin/retval build/retval.o build/libio.o
|
||||
|
||||
.PHONY: roll
|
||||
roll: bin/roll
|
||||
|
||||
bin/roll: roll/roll
|
||||
bin/roll: sysexits roll/roll.c roll/Makefile
|
||||
$(MAKE) -C roll sane
|
||||
cp roll/roll bin/roll
|
||||
|
||||
roll/roll: sysexits roll/roll.c roll/Makefile
|
||||
$(MAKE) -C roll sane
|
||||
|
||||
.PHONY: rot13
|
||||
rot13: bin/rot13
|
||||
|
||||
bin/rot13: rot13/rot13
|
||||
cp rot13/rot13 bin/rot13
|
||||
|
||||
rot13/rot13: sysexits rot13/rot13.c rot13/Makefile
|
||||
bin/rot13: sysexits rot13/rot13.c rot13/Makefile
|
||||
$(MAKE) -C rot13 sane
|
||||
cp rot13/rot13 bin/rot13
|
||||
|
||||
rldecode.o: sysexits src/runlength.c
|
||||
$(CC) $(CFLAGS) -Df=decode -c -o build/rldecode.o src/runlength.c
|
||||
@ -156,13 +151,12 @@ streq.o: libio sysexits src/streq.c
|
||||
streq: libio streq.o
|
||||
$(CC) $(CFLAGS) -o bin/streq build/libio.o build/streq.o
|
||||
|
||||
.PHONY: str
|
||||
str: bin/str
|
||||
|
||||
bin/str: str/str
|
||||
cp str/str bin/str
|
||||
|
||||
str/str: sysexits str/str.c str/Makefile
|
||||
bin/str: sysexits str/str.c str/Makefile
|
||||
$(MAKE) -C str sane
|
||||
cp str/str bin/str
|
||||
|
||||
sleep.o: libio sysexits src/sleep.c usefulmacros
|
||||
$(CC) $(CFLAGS) -c -o build/sleep.o src/sleep.c
|
||||
@ -255,25 +249,44 @@ audacious-skins:
|
||||
# system.
|
||||
# i could have downloaded all the icons and put them into a repo for her but
|
||||
# this uses less space
|
||||
grammy-icons: dist/grammy/989wclz.com.png dist/grammy/amazon.com.ico \
|
||||
dist/grammy/bangordailynews.com.png dist/grammy/theguardian.com.png \
|
||||
dist/grammy/centralmaine.com.png dist/grammy/dictionary.com.png \
|
||||
dist/grammy/google.com.jpg dist/grammy/longfellowsgreenhouses.com.jpg \
|
||||
dist/grammy/mainepublic.org.png dist/grammy/news.google.com.png \
|
||||
dist/grammy/newscentermaine.com.png dist/grammy/pressherald.com.png \
|
||||
dist/grammy/weather.com.png
|
||||
|
||||
dist/grammy:
|
||||
mkdir -p dist/grammy/
|
||||
# all these icons are on the internet archive so if the local sites change
|
||||
# they'll still be available
|
||||
grammy-icons:
|
||||
mkdir -p "~/Pictures/icons/"
|
||||
cd "~/Pictures/icons/"
|
||||
curl -o "989wclz.com.png" "https://web.archive.org/web/20200629174002if_/https://989wclz.com/wp-content/themes/wclz/img/touch-icon-144.png"
|
||||
curl -o "amazon.com.ico" "https://web.archive.org/web/20200718050400if_/https://www.amazon.com/favicon.ico"
|
||||
curl -o "bangordailynews.com.png" "http://web.archive.org/web/20200721195123if_/https://i0.wp.com/bdn-data.s3.amazonaws.com/uploads/2020/06/BDN-logo_green-3-1.png"
|
||||
curl -o "theguardian.com.png" "https://web.archive.org/web/20200720041457if_/https://assets.guim.co.uk/images/favicons/fee5e2d638d1c35f6d501fa397e53329/152x152.png"
|
||||
curl -o "centralmaine.com.png" "https://web.archive.org/web/20200720023956if_/https://multifiles.pressherald.com/uploads/sites/2/2014/06/apple-touch-icon-iphone-retina-display.png"
|
||||
curl -o "dictionary.com.png" "https://web.archive.org/web/20200719135458if_/https://www.dictionary.com/hp-assets/dcom_favicon-1bff2f1b49c077ed504e55c3649f2a4b.png"
|
||||
curl -o "google.com.jpg" "https://web.archive.org/web/20170621105937if_/https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no/photo.jpg"
|
||||
curl -o "longfellowsgreenhouses.com.jpg" "https://web.archive.org/web/20200718173559im_/https://longfellowsgreenhouses.com/wp-content/uploads/2020/03/Longfellows-Logo-Light-Green.jpg"
|
||||
curl -o "mainepublic.org.png" "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/e5/8e/30457/1/c300.png"
|
||||
curl -o "news.google.com.png" "https://upload.wikimedia.org/wikipedia/commons/0/0b/Google_News_icon.png"
|
||||
curl -o "newscentermaine.com.png" "https://web.archive.org/web/20200721190548if_/https://www.newscentermaine.com/assets/favicons/WCSH.png?ver=2.4.7.4"
|
||||
curl -o "pressherald.com.png" "https://multifiles.pressherald.com/uploads/sites/4/2014/06/apple-touch-icon-iphone-retina-display.png"
|
||||
curl -o "weather.com.png" "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/The_Weather_Channel_logo_2005-present.svg/1200px-The_Weather_Channel_logo_2005-present.svg.png"
|
||||
dist/grammy/989wclz.com.png: dist/grammy
|
||||
curl -o "dist/grammy/989wclz.com.png" "https://web.archive.org/web/20200629174002if_/https://989wclz.com/wp-content/themes/wclz/img/touch-icon-144.png"
|
||||
dist/grammy/amazon.com.ico: dist/grammy
|
||||
curl -o "dist/grammy/amazon.com.ico" "https://web.archive.org/web/20200718050400if_/https://www.amazon.com/favicon.ico"
|
||||
dist/grammy/bangordailynews.com.png: dist/grammy
|
||||
curl -o "dist/grammy/bangordailynews.com.png" "http://web.archive.org/web/20200721195123if_/https://i0.wp.com/bdn-data.s3.amazonaws.com/uploads/2020/06/BDN-logo_green-3-1.png"
|
||||
dist/grammy/theguardian.com.png: dist/grammy
|
||||
curl -o "dist/grammy/theguardian.com.png" "https://web.archive.org/web/20200720041457if_/https://assets.guim.co.uk/images/favicons/fee5e2d638d1c35f6d501fa397e53329/152x152.png"
|
||||
dist/grammy/centralmaine.com.png: dist/grammy
|
||||
curl -o "dist/grammy/centralmaine.com.png" "https://web.archive.org/web/20200720023956if_/https://multifiles.pressherald.com/uploads/sites/2/2014/06/apple-touch-icon-iphone-retina-display.png"
|
||||
dist/grammy/dictionary.com.png: dist/grammy
|
||||
curl -o "dist/grammy/dictionary.com.png" "https://web.archive.org/web/20200719135458if_/https://www.dictionary.com/hp-assets/dcom_favicon-1bff2f1b49c077ed504e55c3649f2a4b.png"
|
||||
dist/grammy/google.com.jpg: dist/grammy
|
||||
curl -o "dist/grammy/google.com.jpg" "https://web.archive.org/web/20170621105937if_/https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no/photo.jpg"
|
||||
dist/grammy/longfellowsgreenhouses.com.jpg: dist/grammy
|
||||
curl -o "dist/grammy/longfellowsgreenhouses.com.jpg" "https://web.archive.org/web/20200718173559im_/https://longfellowsgreenhouses.com/wp-content/uploads/2020/03/Longfellows-Logo-Light-Green.jpg"
|
||||
dist/grammy/mainepublic.org.png: dist/grammy
|
||||
curl -o "dist/grammy/mainepublic.org.png" "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/e5/8e/30457/1/c300.png"
|
||||
dist/grammy/news.google.com.png: dist/grammy
|
||||
curl -o "dist/grammy/news.google.com.png" "https://upload.wikimedia.org/wikipedia/commons/0/0b/Google_News_icon.png"
|
||||
dist/grammy/newscentermaine.com.png: dist/grammy
|
||||
curl -o "dist/grammy/newscentermaine.com.png" "https://web.archive.org/web/20200721190548if_/https://www.newscentermaine.com/assets/favicons/WCSH.png?ver=2.4.7.4"
|
||||
dist/grammy/pressherald.com.png: dist/grammy
|
||||
curl -o "dist/grammy/pressherald.com.png" "https://multifiles.pressherald.com/uploads/sites/4/2014/06/apple-touch-icon-iphone-retina-display.png"
|
||||
dist/grammy/weather.com.png: dist/grammy
|
||||
curl -o "dist/grammy/weather.com.png" "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/The_Weather_Channel_logo_2005-present.svg/1200px-The_Weather_Channel_logo_2005-present.svg.png"
|
||||
|
||||
# nmap 7.80 is the last Free nmap release
|
||||
nmap:
|
||||
@ -283,13 +296,16 @@ nmap:
|
||||
./configure
|
||||
make
|
||||
|
||||
spacer:
|
||||
# creates an 8GB empty file in the root dir
|
||||
.PHONY: spacer
|
||||
spacer: dist/spacer.bin
|
||||
|
||||
dist/spacer.bin:
|
||||
# creates an 8GB empty file
|
||||
# that way when the alarm bells go off you can delete it to save a
|
||||
# couple minutes before the system really runs out of disk
|
||||
#
|
||||
# 512 * 16777216 = 8GB
|
||||
dd bs=512 count=16777216 </dev/zero >/spacer.bin
|
||||
dd bs=512 count=16777216 </dev/zero >dist/spacer.bin
|
||||
|
||||
unscii-pkgsrc:
|
||||
cd /usr/pkgsrc/fonts/unscii
|
||||
@ -307,4 +323,4 @@ unscii-user:
|
||||
curl "http://viznut.fi/unscii/unscii-16-full.pcf" >"~/.fonts/unscii-16-full.pcf"
|
||||
curl "http://viznut.fi/unscii/unscii-16-full.ttf" >"~/.fonts/unscii-16-full.ttf"
|
||||
|
||||
.PHONY: all clean cleanlibraries cleanprograms echo nonzero pscat roll rot13 stdbool str sysexits usefulmacros
|
||||
.PHONY: all clean cleanlibraries cleanprograms stdbool sysexits usefulmacros
|
||||
|
Loading…
Reference in New Issue
Block a user