Skip to content

Commit

Permalink
updated makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeoli committed Aug 26, 2024
1 parent 46061a5 commit aa02f7d
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,30 @@ DIR = .
# basic libraries
LIB = -lm

# common flags
COMMON_SW = -std=c++14

# debug switches
SW = -g -std=c++14 -Wall
SW_DEBUG = -g -Wall $(COMMON_SW)
# production switches
#SW = -O3 -DNDEBUG -std=c++14
SW_RELEASE = -O3 -DNDEBUG $(COMMON_SW)

# compiler
CC = clang++

# default target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

default: $(DIR)/MCFSolve $(DIR)/TestMCF
default: release

# debug target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

debug: SW = $(SW_DEBUG)
debug: $(DIR)/MCFSolve $(DIR)/TestMCF

# release target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

release: SW = $(SW_RELEASE)
release: $(DIR)/MCFSolve $(DIR)/TestMCF

# define & include the necessary modules- - - - - - - - - - - - - - - - - - -
# if a module is not used in the current configuration, just comment out the
Expand Down Expand Up @@ -59,10 +72,18 @@ $(DIR)/Main.o: $(DIR)/Main.C $(libMCFClH)
$(DIR)/TestMain.o: $(DIR)/TestMain.C $(libMCFClH)
$(CC) -c $*.C -o $@ $(libMCFClINC) $(SW)

# clean - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# clean target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

clean::
rm -Rf $(DIR)/MCFSolve $(DIR)/TestMCF $(DIR)/*.o $(DIR)/*~ \
$(DIR)/*.dSYM

# distclean target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

distclean: clean

# phony targets - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

.PHONY: debug release clean distclean

############################ End of makefile #################################

0 comments on commit aa02f7d

Please sign in to comment.