|
| 1 | +include configs/make.amdclang |
| 2 | +builddir=./ |
| 3 | +ifdef EXTRA_CXX_FLAGS |
| 4 | + CXXFLAGS2 += $(EXTRA_CXX_FLAGS2) |
| 5 | + CXXFLAGS += $(EXTRA_CXX_FLAGS) |
| 6 | +endif |
| 7 | + |
| 8 | +ifdef EXTRA_LINK_FLAGS |
| 9 | + linklibs += $(EXTRA_LINK_FLAGS) |
| 10 | +endif |
| 11 | + |
| 12 | +OBJSW4 = |
| 13 | + |
| 14 | +OBJ = curvitest.o curvilinear4sgc.o Events.o |
| 15 | + |
| 16 | + |
| 17 | +# prefix object files with build directory |
| 18 | +FSW4 = $(addprefix $(builddir)/,$(OBJSW4)) |
| 19 | +FOBJ = $(addprefix $(builddir)/,$(OBJ)) $(addprefix $(builddir)/,$(QUADPACK)) |
| 20 | + |
| 21 | +# prefix |
| 22 | +sw4ck: $(FSW4) $(FOBJ) |
| 23 | + @echo "*** Configuration file: '" $(foundincfile) "' ***" |
| 24 | + @echo "********* User configuration variables **************" |
| 25 | + @echo "debug=" $(debug) " proj=" $(proj) " etree=" $(etree) " SW4ROOT"= $(SW4ROOT) |
| 26 | + @echo "CXX=" $(CXX) "EXTRA_CXX_FLAGS"= $(EXTRA_CXX_FLAGS) |
| 27 | + @echo "FC=" $(FC) " EXTRA_FORT_FLAGS=" $(EXTRA_FORT_FLAGS) |
| 28 | + @echo "EXTRA_LINK_FLAGS"= $(EXTRA_LINK_FLAGS) |
| 29 | + @echo "******************************************************" |
| 30 | + cd $(builddir); $(LINKER) $(LINKFLAGS) -o $@ $(OBJ) $(linklibs) |
| 31 | +# test: linking with openmp for the routine rhs4sgcurv.o |
| 32 | +# cd $(builddir); $(CXX) $(CXXFLAGS) -qopenmp -o $@ main.o $(OBJ) $(QUADPACK) $(linklibs) |
| 33 | + @echo "*** Build directory: " $(builddir) " ***" |
| 34 | + |
| 35 | +$(builddir)/%.o:./%.C |
| 36 | + cd $(builddir); $(CXX) $(CXXFLAGS) -c $< |
| 37 | + |
| 38 | +clean: |
| 39 | + rm sw4ck *.o *.bc *.s *.cui |
| 40 | + |
| 41 | +format: |
| 42 | + clang-format -style Google -i src/*.C |
| 43 | + clang-format -style Google -i src/*.h |
| 44 | + |
| 45 | +tags: |
| 46 | + etags -o src/TAGS src/*.C src/*.h |
0 commit comments