Re: [opensuse] need help with simple Makefile - no rule to make target (huh?)
On 11/19/2010 10:30 AM, Philipp Thomas wrote:
On Fri, 19 Nov 2010 04:01:38 +0100, David Haller
wrote: imake is similar, IIRC (but a bit more restricted).
No, Imake is horrible :) It misues the C preprocessor as its macro processor so you have to write your Imakefiles like a C file. The autotools are more honest and use m4 and in the case of automake lots of Perl.
scons and bjam seem just as inflexible as cmake, and difficult to "massage" / adapt.
They aren't inflexible, but you have to learn completely different configuration languages for each of them.
And, as Philipp can testify, I'm not one to give up easy.
Definitely. Things really have to be horrible for you to give up.
Gah! Documentation? Missing, lacking, misleading, plain wrong. Pick four.
That goes directly to my my sig collection!
Philipp
David, Philipp, Thanks for the follow-up and I'll definitely include you on any other issues I plow through here. I've ended up just sticking with hand-written makefiles for now. I worked through Philipp's autoscan/configure.ac approach, but ran into a few issues due to still being on an 11.0 box. I haven't had time to further chase those issues on 11.3 yet. With your makefile suggestions, I ended up with the following that works great. It's hard to justify a lot more time exploring/troubleshooting automagic tools until the project grows a bit. With things this simple, the simple hand-rolled makefiles work fine. (and make recompiles a breeze -- you just have to remember the name of the makefile that's current :-) 13:41 alchemy:~/dev/test> cat Makefile.sim CC := gcc CFLAGS := -O2 CFLAGS += -Wall -W -Wno-unused OBJECTS := sim_orbm.o fn_const.o fn_state.o isolv_state.o # linking CCLD := $(CC) LDFLAGS := -Wl LIBS := -lgslcblas -lgsl -lm orbs : $(OBJECTS) $(CCLD) -o orbs $(OBJECTS) $(LDFLAGS) $(LIBS) sim_orbm.o : fn_const.h fn_state.h isolv_state.h fn_const.o : fn_const.h fn_state.o : fn_state.h isolv_state.o : isolv_state.h clean: rm -f orbs $(OBJECTS) I haven't further shortened the makefile because I have a number of sources and headers in the directory (which is just a test bed). Once I move specific files into an actual project dir, I'll make the makefile more generic... (that's once the project actually has a form more than a dozen or so programs used to confirm and troubleshoot the math in the code being used ;-) -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 19 Nov 2010 13:51:15 -0600, "David C. Rankin"
CFLAGS += -Wall -W -Wno-unused
If I were you I'd add -D_FORTIFY_SOURCE=2 to the options. This activates additional checks from glibc that help prevent buffer overflows. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 11/20/2010 12:35 PM, Philipp Thomas wrote:
If I were you I'd add -D_FORTIFY_SOURCE=2 to the options. This activates additional checks from glibc that help prevent buffer overflows.
Done, thanks! There are a world of options I've yet to stumble across. One more tool added to the toolbox. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
El 19/11/10 16:51, David C. Rankin escribió:
13:41 alchemy:~/dev/test> cat Makefile.sim CC := gcc CFLAGS := -O2 CFLAGS += -Wall -W -Wno-unused
Include the output of rpm --eval %optflags and -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Wformat=2 in CFLAGS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 11/20/2010 02:20 PM, Cristian Rodríguez wrote:
El 19/11/10 16:51, David C. Rankin escribió:
13:41 alchemy:~/dev/test> cat Makefile.sim CC := gcc CFLAGS := -O2 CFLAGS += -Wall -W -Wno-unused
Include the output of rpm --eval %optflags and -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Wformat=2 in CFLAGS
Now we're cooking :p CFLAGS := -O2 -Wall -W -Wno-unused CFLAGS += -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 CFLAGS += -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls CFLAGS += -Wshadow -Wstrict-prototypes -Wformat=2 -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Cristian Rodríguez
-
David C. Rankin
-
Philipp Thomas