FEHM icon indicating copy to clipboard operation
FEHM copied to clipboard

Makefile bugs

Open shane-mckinney opened this issue 6 years ago • 5 comments

Debug option compiles .o's in -O2 mode

It would be preferable to be able to compile into a build/ dir

shane-mckinney avatar Jun 13 '19 21:06 shane-mckinney

Should we only have the executable put into build/, or should *.o files go there as well? I don't think there are any other build artifacts.

daniellivingston avatar Jun 13 '19 21:06 daniellivingston

Note that if we just want the binary only in build/, then something like this could be done:

$ pwd
/somedir/FEHM/
$ mkdir build/
$ cd src && make all EXE=../build/xfehm_v3.3.1

daniellivingston avatar Jun 13 '19 21:06 daniellivingston

why would you just want the binary in there? build directories hold all the built things! i think its nice for git tracking because you can untrack all of the build related files easier? other thansomething like that its nice to have auto complete not get stuck on *.f vs *.o , also if youre looking for a file name in there its already messy enough as is without all the the .mod's and .o's

Shane McKinney Los Alamos National Laboratory EES-16 Computational Earth Sciences [email protected] 292026 505-412-9844


From: Daniel Livingston [email protected] Sent: Thursday, June 13, 2019 3:39:45 PM To: lanl/FEHM Cc: Mckinney, Shane Wesley; Author Subject: Re: [lanl/FEHM] Makefile bugs (#21)

Note that if we just want the binary only in build/, then something like this could be done:

$ mkdir build/ $ cd src && make all EXE=../build/xfehm_v3.3.1

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/lanl/FEHM/issues/21?email_source=notifications&email_token=AEVQ2TOFEVM3PH6T5CPN4Y3P2K5CDA5CNFSM4HX7TA62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXVDP5Y#issuecomment-501889015, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEVQ2TKZBKXA7LLHR7XIVOLP2K5CDANCNFSM4HX7TA6Q.

shane-mckinney avatar Jun 13 '19 21:06 shane-mckinney

i think its nice for git tracking because you can untrack all of the build related files easier

The .gitignore file is configured to not track build artifacts:

*.o
*.mod
debug/*
build/*
src/dated.f
*.pyc
*DS_Store

But yeah, valid point. @millerta , thoughts on building the binary and build artifacts into build/ instead of src/?

daniellivingston avatar Jun 13 '19 22:06 daniellivingston

@shane-mckinney The make debug problem is fixed as of 6fa70575faeca51c62ce4047409aba6d85c0452f. Take a pull and see if this is what you're after.

daniellivingston avatar Jun 13 '19 22:06 daniellivingston