[Advcomparch] provlima kata to compile
Nikos Anastopoulos
anastop at cslab.ece.ntua.gr
Sat Jun 14 18:50:20 EEST 2008
To provlhma mallon vrisketai sto oti prepei na ginei include kai to stdlib.h:
#include <stdlib.h>
Epeidh egw to 'xa kanei include exarxhs (opws to kanw kai sxedon gia ola ta
programmata C), den etyxe na diapistwsw ta dika sou provlhmata...
Elpizw twra na lythoun.. :)
N.
On Sat, Jun 14, 2008 at 06:21:10PM +0300, Nikos Anastopoulos wrote:
> Me to Makefile pou esteiles, sto diko mou systhma ena aplo programma
> metaglwttizetai kanonika xwris na emfanizei lathi 'h warnings.
> Ypopteyomai oti kati paizei isws me ta includes 'h ta defines...
> An thes, gia na mhn spam-aroume th lista, steile sto mail mou to source dir
> tou programmatos sou (prog) mpas kai kataferw na anaparagagw to problhma pou
> sou emfanizei.
>
> N.
>
>
> On Sat, Jun 14, 2008 at 05:49:56PM +0300, xristos86 wrote:
> > Tsekara tis odigies vima-vima,alla dustuxws de vrika kapoio lathos.
> >
> > An voithaei kapou,auto pou katafera na tsekarw itan oti an tou dwsw sketo
> > "make -f Makefile.mips" anti gia "make -f Makefile.mips prog",toulaxiston to
> > sesc_events.o to ftiaxnei epituxws.
> >
> > Kai gia na eimaste apolutws sigouroi,parathetw to makefile mou opws akrivws
> > einai:
> >
> > TARGET_NAME = mipseb-linux
> > BASEDIR = /home/xristos86/sesc-sim/sescutils/install
> > BINDIR = $(BASEDIR)/bin/
> > INCLUDEDIR = $(BASEDIR)/$(TARGET_NAME)/include/
> > LIBDIR = $(BASEDIR)/$(TARGET_NAME)/lib/
> > SESC_LIBAPP = /home/xristos86/sesc-sim/sesc/src/libapp/
> > CC = $(BINDIR)/$(TARGET_NAME)-gcc
> > LD = $(BINDIR)/$(TARGET_NAME)-ld
> >
> > #SESC-specific compiler flags
> > CFLAGS = -mips2 -mabi=32 -Wa,-non_shared -mno-abicalls
> >
> > #εδώ βάζετε ό,τι επιπλέον flags θέλετε, π.χ. για warnings,
> > #optimizations, κλπ
> > OTHER_FLAGS = -Wall -O2
> > CFLAGS += $(OTHER_FLAGS)
> >
> > #εδώ ορίζετε επιπλέον βιβλιοθήκες που θέλετε να κάνετε link
> > #στο εκτελέσιμό σας (π.χ. την libm για μαθηματικές ρουτίνες)
> > LIBS = -lm
> >
> > #SESC-specific linker flags
> > LDFLAGS = -static
> > -Wl,--script=$(BASEDIR)/$(TARGET_NAME)/lib/ldscripts/mint.x
> >
> > #τα object files (από ένα ή περισσότερα .c αρχεία)
> > OBJS = prog.o sesc_events.o
> >
> > #link object files to executable
> > prog: $(OBJS)
> > $(CC) $(LDFLAGS) $(OBJS) -o prog -L$(LIBDIR) $(LIBS)
> >
> > #compile sources to object files
> > prog.o: prog.c
> > $(CC) $(CFLAGS) -I/$(INCLUDEDIR) -I/$(SESC_LIBAPP) -c -o prog.o prog.c
> >
> > sesc_events.o: $(SESC_LIBAPP)/sesc_events.c
> > $(CC) $(CFLAGS) -I/$(INCLUDEDIR) -I/$(SESC_LIBAPP) -c -o sesc_events.o
> > $(SESC_LIBAPP)/sesc_events.c
> >
> > #clean up things...
> > clean:
> > rm -f *.o prog sesc_events
> >
> >
> > An skefteite ti mporei na ftaiei,mou lete!
> > Euxaristw kai pali!
>
> > _______________________________________________
> > Advcomparch mailing list
> > Advcomparch at lists.cslab.ece.ntua.gr
> > http://lists.cslab.ece.ntua.gr/mailman/listinfo/advcomparch
>
> _______________________________________________
> Advcomparch mailing list
> Advcomparch at lists.cslab.ece.ntua.gr
> http://lists.cslab.ece.ntua.gr/mailman/listinfo/advcomparch
More information about the Advcomparch
mailing list