[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gnucap development snapshot 2008-12-03



Am Freitag, den 12.12.2008, 21:53 -0500 schrieb al davis:
> There is a new development snapshot available ... 
> http://gnucap.org/devel/gnucap-2008-12-12.tar.gz
> 

Thank you very much.

I tried to compile it inside of my Gentoo-System using an older ebuild
script. (For most software this works.)

For gnucap it failed.

Problem seems to be related to some substitutions, which the ebuild
script makes to Make2 files:

	sed -i -e 's:CFLAGS = -O2 -g:CPPFLAGS +=:' \
		-e '/CCFLAGS =/i\CFLAGS += $(CPPFLAGS)' \
		-e 's:CCFLAGS = $(CFLAGS):CXXFLAGS += $(CPPFLAGS):' \
		-e 's:LDFLAGS = :LDFLAGS += :' \
		-e 's:CCFLAGS:CXXFLAGS:' \
		-e "s:../Gnucap:${S}/src:" \
		models-*/Make2 || die "sed failed"

stefan@AMD64-X2 ~/gnuc/gnucap-2008-12-12/models-spice3f5 $ cat Make2
# $Id$ -*- Makefile -*-

PREFIX = /usr/local/gnucap
INSTALL_DIR = $(PREFIX)/lib/models/spice3f5
SPICE_INCLUDE = ../Include
GNUCAP_INCLUDE = ../Gnucap
VPATH = .:$(SPICE_INCLUDE):$(GNUCAP_INCLUDE)

C_SRCS = $(CFILES) devsup.c
CC_SRCS = spice-wrapper.cc

OBJS = ${CC_SRCS:.cc=.o} ${C_SRCS:.c=.o}

CC = gcc
CCC = g++

CFLAGS = -O0 -g -I. -I$(SPICE_INCLUDE) -DTRACE_UNTESTED -D
$(SPICE_VERSION) \
 -DPREDICTOR -DHAS_STDLIB -fPIC

CCFLAGS = $(CFLAGS) -I$(GNUCAP_INCLUDE) -Wall -Wextra 

LDFLAGS = -shared

LIBS = 

SO_EXTENSION = .so

.SUFFIXES:
.SUFFIXES: .o .cc .c
.cc.o:; $(CCC) $(CCFLAGS) -c $<
.c.o:; $(CC) $(CFLAGS) -c $<

$(TARGET) : $(TARGET)$(SO_EXTENSION)
	echo $(TARGET) done

$(TARGET)$(SO_EXTENSION) : $(OBJS) Makefile
	$(CCC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)$(SO_EXTENSION)

clean: $(HDRS)
	-rm *.o $(TARGET)$(SO_EXTENSION) $(TARGET)

spice-wrapper.o: spice-wrapper.cc wrapper.h

$(OBJS) : $(HDRS)

install:
	mkdir --parents $(INSTALL_DIR)
	cp $(TARGET)$(SO_EXTENSION) $(INSTALL_DIR)
stefan@AMD64-X2 ~/gnuc/gnucap-2008-12-12/models-spice3f5 $ 


Before I try to fix the ebuild, I have two questions:
You use CCFLAGS in Make2.gcc. My impression is that most gcc software
uses flags CFLAGS (for plain C) and CXXFLAGS (for C++) and CPPFlags. I
have tried some google search for CCFLAGS but found not too much. Do you
have a good reason why you use CCFLAGS for gcc?

You use
CFLAGS = -O0 -g

I think this is no optimization, with generation of debugging code.
Is there a good reason for this?

Best regards

Stefan Salewski





_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user