Take CFLAGS from environment in Makefiles

This commit is contained in:
Benjamin Saunders 2013-07-31 21:23:30 -07:00
parent 55dbed59ae
commit 58bb8e0cdf
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,7 @@
GMP_INCLUDE_DIR :=
CC :=gcc
CABAL :=cabal
CFLAGS :=-O2 -Wall $(CFLAGS)
#CABALFLAGS :=
## Disable building of Effects
#CABALFLAGS :=-f NoEffects

View File

@ -1,6 +1,6 @@
include ../config.mk
CFLAGS=-c -O2 -Wall -Wextra -fPIC -Wno-unused-parameter
CFLAGS:=-Wextra -fPIC -Wno-unused-parameter $(CFLAGS)
SOURCES=defs.c
OBJECTS=$(SOURCES:.c=.o)
LIB=libidris_rts.a
@ -12,7 +12,7 @@ $(LIB): $(OBJECTS)
ranlib $@
.c.o:
$(CC) $(CFLAGS) $< -o $@
$(CC) -c $(CFLAGS) $< -o $@
install: $(LIB) .PHONY
mkdir -p $(TARGET)

View File

@ -2,8 +2,7 @@ include ../config.mk
OBJS = idris_rts.o idris_heap.o idris_gc.o idris_gmp.o idris_stdfgn.o idris_bitstring.o idris_opts.o idris_stats.o
HDRS = idris_rts.h idris_heap.h idris_gc.h idris_gmp.h idris_stdfgn.h idris_bitstring.h idris_opts.h idris_stats.h
CFLAGS = -O2 -Wall -fPIC
CFLAGS:=-fPIC $(CFLAGS)
ifneq ($(GMP_INCLUDE_DIR),)
CFLAGS += -isystem $(GMP_INCLUDE_DIR)
endif