From 990628258858ffad22e3a4b8886dc7855f0205f5 Mon Sep 17 00:00:00 2001 From: Tait Hoyem <44244401+TTWNO@users.noreply.github.com> Date: Sat, 29 Jun 2019 15:49:00 +0000 Subject: [PATCH] Add ability to change compiler. gcc is default: --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ad91fa5..aa5397d 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ +CC?=gcc + defualt: build morse.o: - gcc -O2 morse.c -c -o morse.o + $(CC) -O2 morse.c -c -o morse.o build: morse.o - gcc -O2 morse.o main.c -o morse + $(CC) -O2 morse.o main.c -o morse tests: morse.o - gcc -O2 test.c morse.o -o test + $(CC) -O2 test.c morse.o -o test install: cp morse ~/.local/bin/