Created
August 31, 2014 08:14
-
-
Save serverwentdown/2d9bddc30cc05e825ff9 to your computer and use it in GitHub Desktop.
Makefile for all my CS C labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
for f in `find * -type d -maxdepth 0 ! -regex .`; do\ | |
gcc -o $$f/main.o $$f/main.c;\ | |
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
make compile && make zip | |
compile: | |
for f in `find * -type d -maxdepth 0 ! -regex .`; do\ | |
echo "making in ./$$f/...";\ | |
make -C $$f/ > /dev/null;\ | |
done; | |
zip: | |
for f in `find * -type d -maxdepth 0 ! -regex .`; do\ | |
rm AmbroseChua$$f.zip;\ | |
echo "zipping up ./$$f/...";\ | |
zip -r AmbroseChua$$f.zip $$f > /dev/null;\ | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment