Sunday, October 11, 2015



Modify Makefile

 # To assist in cross-compiling  
             CC=arm-linux-gnueabihf-gcc  
             AR=arm-linux-gnueabihf-ar  
             RANLIB=arm-linux-gnueabihf-ranlib  
             LDFLAGS=  
             ####I add so file,because boost lib need so lib,not static library.  
             BZLIB=libbz2.so.1.0.6  
                                 
             #CLAGS=-Wall -Winline -O2 -g $(BIGFILES)  
             CLAGS=-Wall -Winline -O2 -g $(BIGFILES) -fPIC  
             SFLAGS=-shared   
             PREFIX=$(PWD)/_install  
               
             #all: libbz2.a bzip2 bzip2recover test  
             all: libbz2.a $(BZLIB)  
   
             $(BZLIB): $(OBJS)  
                  $(CC) $(SFLAGS) $(LDFLAGS) -o $@ $^  
   
             ####bzip2 and bzip2recover can not be execute on the ubuntu host,
                   they are binary based arm architecture.   
             #install: bzip2 bzip2recover  
       install: $(BZLIB)  
   
   
    
                #cp -f bzip2 $(PREFIX)/bin/bzip2  
                #cp -f bzip2 $(PREFIX)/bin/bunzip2  
                #cp -f bzip2 $(PREFIX)/bin/bzcat  
                #cp -f bzip2recover $(PREFIX)/bin/bzip2recover  
                #chmod a+x $(PREFIX)/bin/bzip2  
                #chmod a+x $(PREFIX)/bin/bunzip2  
                #chmod a+x $(PREFIX)/bin/bzcat  
                #chmod a+x $(PREFIX)/bin/bzip2recover  
                cp -f libbz2.a $(PREFIX)/lib  
                chmod a+r $(PREFIX)/lib/libbz2.a  
                cp -f $(BZLIB) $(PREFIX)/lib  
                chmod a+r $(PREFIX)/lib/$(BZLIB)  


 make  
 make PREFIX=$PREFIX install  





Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Lập trình hệ thống nhúng Linux . Powered by Luong Duy Ninh -