Last active
March 8, 2019 16:09
-
-
Save KentaKudo/8ae26cc837cf39100805f656b6146094 to your computer and use it in GitHub Desktop.
A snippet for the Makefile of the C compiler on x86_64 in working with macOS
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
WORKDIR := /usr/src/mycc | |
mycc: mycc.c | |
@docker run --rm -v ${PWD}:${WORKDIR} -w ${WORKDIR} gcc:8.3 gcc -o mycc mycc.c | |
.PHONY: test | |
test: mycc | |
@docker run --rm -v ${PWD}:${WORKDIR} -w ${WORKDIR} gcc:8.3 ./test.sh | |
.PHONY: clean | |
clean: | |
@rm -f mycc *.o *~ tmp* | |
.PHONY: debug | |
debug: | |
@docker run --rm -it -v ${PWD}:${WORKDIR} -w ${WORKDIR} gcc:8.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment