Use standard C compiler by default

Always use the standard compiler as defined by the environment
variable CC. User can set it when a different compiler if required
(e.g. CC=clang make)
This commit is contained in:
Alexandre Erwin Ittner 2016-04-19 21:44:46 -03:00
parent 092f463ea9
commit 72e9496768
5 changed files with 0 additions and 55 deletions

View File

@ -1,10 +1,6 @@
# Install
BIN = demo
# Compiler
CC = clang
DCC = gcc
# Flags
CFLAGS = -std=c89 -pedantic
@ -23,15 +19,6 @@ else
endif
endif
# Modes
.PHONY: gcc
gcc: CC = gcc
gcc: $(BIN)
.PHONY: clang
clang: CC = clang
clang: $(BIN)
$(BIN):
@mkdir -p bin
rm -f bin/$(BIN) $(OBJS)

View File

@ -1,10 +1,6 @@
# Install
BIN = demo
# Compiler
CC = clang
DCC = gcc
# Flags
CFLAGS = -std=c99 -pedantic -O2
@ -23,15 +19,6 @@ else
endif
endif
# Modes
.PHONY: clang
clang: CC = clang
clang: $(BIN)
.PHONY: gcc
gcc: CC = gcc
gcc: $(BIN)
$(BIN):
@mkdir -p bin
rm -f bin/$(BIN) $(OBJS)

View File

@ -1,10 +1,6 @@
# Install
BIN = demo
# Compiler
CC = clang
DCC = gcc
# Flags
CFLAGS = -std=c99 -pedantic -O2
@ -23,15 +19,6 @@ else
endif
endif
# Modes
.PHONY: clang
clang: CC = clang
clang: $(BIN)
.PHONY: gcc
gcc: CC = gcc
gcc: $(BIN)
$(BIN):
@mkdir -p bin
rm -f bin/$(BIN) $(OBJS)

View File

@ -1,25 +1,12 @@
# Install
BIN = zahnrad
# Compiler
CC = clang
DCC = gcc
# Flags
CFLAGS = -std=c89 -pedantic -O2
SRC = main.c
OBJ = $(SRC:.c=.o)
# Modes
.PHONY: gcc
gcc: CC = gcc
gcc: $(BIN)
.PHONY: clang
clang: CC = clang
clang: $(BIN)
$(BIN):
@mkdir -p bin
rm -f bin/$(BIN) $(OBJS)

View File

@ -1,6 +1,3 @@
# Compiler
CC = clang
# Flags
CFLAGS = -std=c99 -pedantic -O2