[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Re: how to compile mutilble C files with a multible headers in Uclinux platform



hello sir,
Iam using petalinux -0.40 source I have a problem in compiling and linking C files .I created a hello world application it works well .I took a complex application .Icopied all cfiles and headers in single direcory  and compile .It compilles correctly but gives errors in linkage .How can i add dependency in ur make file that consists multible headers and multiple Cfiles.
 
ifndef PETALINUX
$(error You must source the petalinux/settings.sh script before working with PetaLinux)
endif
# Point to default PetaLinux root directory
ifndef ROOTDIR
ROOTDIR=$(PETALINUX)/software/petalinux-dist
endif
PATH:=$(PATH):$(ROOTDIR)/tools
UCLINUX_BUILD_USER = 1
-include $(ROOTDIR)/.config
-include $(ROOTDIR)/$(CONFIG_LINUXDIR)/.config
LIBCDIR = $(CONFIG_LIBCDIR)
-include $(ROOTDIR)/config.arch
ROMFSDIR=$(ROOTDIR)/romfs
ROMFSINST=$(ROOTDIR)/tools/romfs-inst.sh
APP =H264dec
# Options for the compiler
CFLAGS = -Iinclude-lm
# Add any other object files to this list below
#APP_OBJS = obj/TbCom.o obj/TbConvert.o obj/TbSystem.o obj/coot-boot.o
APP_OBJS = obj/annexb.o obj/header.o obj/leaky_bucket.o obj/output.o obj/biaridecod.o obj/image.o obj/loopFilter.o obj/parsetcommon.o obj/blk_prediction.o obj/img_io.o obj/macroblock.o obj/parset.o obj/block.o obj/img_process.o obj/mb_access.o obj/quant.o obj/cabac.o obj/input.o obj/mb_prediction.o obj/rtp.o obj/context_ini.o obj/intra16x16_pred.o obj/mbuffer.o obj/sei.o obj/erc_api.o obj/intra4x4_pred.o obj/mc_prediction.o obj/transform8x8.o obj/erc_do_i.o obj/intra8x8_pred.o obj/memalloc.o obj/transform.o obj/erc_do_p.o obj/intra_chroma_pred.o obj/mv_prediction.o obj/vlc.o obj/errorconcealment.o obj/io_raw.o obj/nal.o obj/win32.o obj/filehandle.o obj/io_tiff.o obj/nalucommon.o obj/fmo.o obj/ldecod.o obj/nalu.o
all: $(APP)
$(APP): $(APP_OBJS)
 $(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS)
clean:
 -rm -f $(APP) *.elf *.gdb obj/*.o
romfs:
 $(ROMFSINST) $(APP) /bin/$(APP)
obj/%.o: allfiles/%.c
 $(CC) -c $(CFLAGS) -o $@ $<
#obj/%.o: allfiles/%.h
# $(CC) -c $(CFLAGS) -o $@ $<

# Targets for the required .config files - if they don't exist, the tree isn't
# configured.  Tell the user this, how to fix it, and exit.
${ROOTDIR}/config.arch ${ROOTDIR}/.config:
 @echo "Error: You must configure the PetaLinux tree before compiling your application"
 @echo ""
 @echo "Change directory to ../../petalinux-dist and 'make menuconfig' or 'make xconfig'"
 @echo ""
 @echo "Once the tree is configured, return to this directory, and re-run make."
 @echo ""
 @exit -1
 
 
 
 
 
 
 
Rangababu(Research scholar)
School of Physics
University of Hyderbad
Hyderabad.500046