summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/cc-auto.mak.in21
-rw-r--r--build/common.mak9
-rw-r--r--build/rules.mak3
3 files changed, 33 insertions, 0 deletions
diff --git a/build/cc-auto.mak.in b/build/cc-auto.mak.in
new file mode 100644
index 00000000..bc565672
--- /dev/null
+++ b/build/cc-auto.mak.in
@@ -0,0 +1,21 @@
+export CC = @CC@ -c
+export CXX = @CXX@ -c
+export AR = @AR@
+export LD = @LD@
+export LDOUT = -o
+export RANLIB = @RANLIB@
+
+export OBJEXT := .@OBJEXT@
+export LIBEXT := .@LIBEXT@
+export LIBEXT2 := @LIBEXT2@
+
+export CC_OUT := @CC_OUT@
+export CC_INC := @CC_INC@
+export CC_DEF := @CC_DEF@
+export CC_OPTIMIZE := @CC_OPTIMIZE@
+export CC_LIB := -l
+
+export CC_SOURCES :=
+export CC_CFLAGS := @CC_CFLAGS@
+export CC_LDFLAGS :=
+
diff --git a/build/common.mak b/build/common.mak
index d6000078..ad6df03e 100644
--- a/build/common.mak
+++ b/build/common.mak
@@ -17,6 +17,15 @@ include $(PJDIR)/build/cc-$(CC_NAME).mak
-include cc-$(CC_NAME).mak
#
+# Include auto configured compiler specification.
+# This will override the compiler settings above.
+# Currently this is made OPTIONAL, to prevent people
+# from getting errors because they don't re-run ./configure
+# after downloading new PJSIP.
+#
+-include $(PJDIR)/build/cc-auto.mak
+
+#
# Include global machine specific definitions
#
include $(PJDIR)/build/m-$(MACHINE_NAME).mak
diff --git a/build/rules.mak b/build/rules.mak
index bbe0ab19..3afdfd47 100644
--- a/build/rules.mak
+++ b/build/rules.mak
@@ -65,6 +65,9 @@ print_common:
@echo $(APP)_CXXFLAGS=$($(APP)_CXXFLAGS)
@echo $(APP)_LDFLAGS=$($(APP)_LDFLAGS)
@echo DEPFLAGS=$(DEPFLAGS)
+ @echo CC=$(CC)
+ @echo AR=$(AR)
+ @echo RANLIB=$(RANLIB)
print_bin: print_common
@echo EXE=$(EXE)