Skip to content

Commit

Permalink
Don't override the CC and C++ environment variables
Browse files Browse the repository at this point in the history
Fixes an issue where some makefiles override the user's CC and C++
environment variables.
  • Loading branch information
ninotarantino committed Dec 6, 2024
1 parent f9d9d6e commit 31961f4
Show file tree
Hide file tree
Showing 37 changed files with 71 additions and 71 deletions.
4 changes: 2 additions & 2 deletions trick_sims/SIM_satellite/models/Satellite/graphics/makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CPP = g++
CC = gcc
CPP ?= g++
CC ?= gcc

ifeq ($(shell uname), Darwin)
GL_LIBS = -framework GLUT -framework OpenGL
Expand Down
4 changes: 2 additions & 2 deletions trick_sims/SIM_wheelbot/models/Battery/test/makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DECL_DIR = ..
GTEST_DIR = ${HOME}/gtest-1.7.0
Expand Down
4 changes: 2 additions & 2 deletions trick_sims/SIM_wheelbot/models/Control/test/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

PROJECT_DIR = ../..

Expand Down
6 changes: 3 additions & 3 deletions trick_sims/SIM_wheelbot/models/Electrical/test/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DECL_DIR = ..
GTEST_DIR = ${HOME}/gtest-1.7.0
Expand Down Expand Up @@ -38,4 +38,4 @@ ElectricalCircuitTest.o : ElectricalCircuitTest.cpp

ElectricalCircuitTest : ElectricalCircuitTest.o gtest_main.o gtest-all.o
$(CPP) $(CFLAGS) -o $@ $^ $(LIBS)


4 changes: 2 additions & 2 deletions trick_sims/SIM_wheelbot/models/Guidance/test/makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DECL_DIR = ..
GTEST_DIR = ${HOME}/gtest-1.7.0
Expand Down
4 changes: 2 additions & 2 deletions trick_sims/SIM_wheelbot/models/Motor/test/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DECL_DIR = ..
GTEST_DIR = ${HOME}/gtest-1.7.0
Expand Down
4 changes: 2 additions & 2 deletions trick_sims/SIM_wheelbot/models/Motor/test/test/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

PROJECT_DIR = ../..

Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/Apps/ExternalPrograms/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CC = gcc
CC ?= gcc

ifndef TRICK_HOST_CPU
TRICK_HOST_CPU := $(shell trick-gte TRICK_HOST_CPU)
Expand Down Expand Up @@ -34,7 +34,7 @@ TRICK_CFLAGS += -Wall
endif

ifeq ($(TRICK_HOST_TYPE),Darwin)
CC = cc
CC ?= cc
LD_SHARED = $(CC) -bundle
TRICK_CFLAGS += -Wall
endif
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/APPS/FXPLOT/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DPX_DIR = ../..

Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/APPS/GXPLOT/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DPX_DIR = ../..

Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/DPC/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DPX_DIR = ..

Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/DPM/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DPX_DIR = ..

Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/DPV/UTILS/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++

DPX_DIR = ../..

Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/TESTING/DPC_TEST/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ endif

SHELL = /bin/sh
RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++
PWD = $(shell pwd)
DEV_NULL = > /dev/null 2>&1
GCC = $(shell which gcc)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/TESTING/DPM_TEST/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

SHELL = /bin/sh
RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++
PWD = $(shell pwd)
DEV_NULL = > /dev/null 2>&1
GCC = $(shell which gcc)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/TESTING/DS/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ endif

SHELL = /bin/sh
RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++
PWD = $(shell pwd)
DEV_NULL = > /dev/null 2>&1
GCC = $(shell which gcc)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/TESTING/DS_exercisor/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

SHELL = /bin/sh
RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++
PWD = $(shell pwd)
DEV_NULL = > /dev/null 2>&1
GCC = $(shell which gcc)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/TESTING/TCDS/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ endif

SHELL = /bin/sh
RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++
PWD = $(shell pwd)
DEV_NULL = > /dev/null 2>&1
GCC = $(shell which gcc)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/TESTING/UDS/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ endif

SHELL = /bin/sh
RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++
PWD = $(shell pwd)
DEV_NULL = > /dev/null 2>&1
GCC = $(shell which gcc)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/DPX/test/unit_test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++

DPX_DIR = ${TRICK_HOME}/trick_source/data_products/DPX
DS_DIR = ${TRICK_HOME}/trick_source/data_products
Expand Down
2 changes: 1 addition & 1 deletion trick_source/data_products/EQParse/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

CC = cc
CC ?= cc

OBJ_DIR = object_${TRICK_HOST_CPU}
LIBDIR = ../lib_${TRICK_HOST_CPU}
Expand Down
2 changes: 1 addition & 1 deletion trick_source/data_products/Log/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

CC = c++
CC ?= c++

ifndef TRICK_HOST_CPU
TRICK_HOST_CPU := $(shell uname -s)
Expand Down
2 changes: 1 addition & 1 deletion trick_source/data_products/Var/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

CC = c++
CC ?= c++

ifndef TRICK_HOST_CPU
TRICK_HOST_CPU := $(shell uname -s)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/data_products/units/makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

ifndef TRICK_HOST_CPU
TRICK_HOST_CPU := $(shell uname -s)
Expand Down
4 changes: 2 additions & 2 deletions trick_source/sim_services/DataTypes/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++


CFLAGS = -g -Wall
Expand Down
4 changes: 2 additions & 2 deletions trick_source/sim_services/DataTypes/testing/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

DECL_DIR = ..

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
4 changes: 2 additions & 2 deletions trick_source/trick_utils/SAIntegrator/examples/Orbit/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CXXFLAGS = -g -Wall
INCLUDE_DIRS = -I../../include
Expand Down
4 changes: 2 additions & 2 deletions trick_source/trick_utils/SAIntegrator/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++

CFLAGS = -g -Wall -std=c++11 ${TRICK_CXXFLAGS}
INCLUDE_DIRS = -Iinclude
Expand Down
2 changes: 1 addition & 1 deletion trick_source/trick_utils/comm/test_programs/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TRICK_HOST_TYPE := $(shell trick-gte TRICK_HOST_TYPE)
endif


CC = cc
CC ?= cc
FLAGS =
ifeq ($(TRICK_HOST_TYPE), Darwin)
LIBS =
Expand Down
4 changes: 2 additions & 2 deletions trick_source/trick_utils/units/Unittest/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ TRICK_HOST_TYPE := $(shell trick-gte TRICK_HOST_TYPE)
endif


CC = gcc
CPP = g++
CC ?= gcc
CPP ?= g++

CFLAGS = -g -Wall -I../include

Expand Down
4 changes: 2 additions & 2 deletions trick_source/web/CivetServer/makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common

RM = rm -rf
CC = cc
CPP = c++
CC ?= cc
CPP ?= c++
CURL = curl
MV = mv
CP = cp
Expand Down

0 comments on commit 31961f4

Please sign in to comment.