Makefile Derleme

  1. KısayolKısayol reportŞikayet pmÖzel Mesaj
    ozgunlu
    ozgunlu's avatar
    Banlanmış Üye
    Kayıt Tarihi: 11/Kasım/2011
    Erkek

    C++ da yazılmış bir sdk var, linux da derlemem gerekiyor.

    Windows da derledim ama *.sln dosyalarını verdiği için visual studio da derledim.

    Linux için de make file dosyalarından size uygun olanını derleyeceksiniz demiş de ben linux da yeniyim.

    Nasıl derlenir bu header file' lar bilmiyorum, "make dosya path' i" şeklinde yazarsan olur falan demiş bi yerde de,

    öyle yapınca "no rule to make target "install" diyor, bunun için de "./configure" yapcakmışız heralde, heh tam da o noktadayım, eğer doğru gittiysem.

    bunu nasıl yaparım ? ( bu arada benim alet ubuntu x86-64, yani iki numaralı gcc' yi derlemem lazım galiba)

    Teşekkürler..

    --------------------

    UPDATE 

    Bu make nedir configure nedir so uzantılı dosya nedir biri hayrına bikaç cümleyle anlatabilirse sevinirim.

    -----------------------------

     

    Make klasörü içeriği :

    > Makefile-Linux-x86-32-gcc

    > Makefile-Linux-x86-64-gcc

    > Makefile-MAC-PPC-gcc

    > Makefile-MAC-x86-32-gcc

    > Makefile-MAC-x86-64-gcc

    > Makefile-Mingw-x86-64-gcc

    > Makefile-Solaris-gcc

    > Targets.mk

     

    Targets.mk içeriği :

    JP2_OBJS     = jp2.o jpb.o jpx.o mj2.o
    IMAGE_OBJS   = kdu_tiff.o
    SUPPORT_OBJS = kdu_region_compositor.o avx2_region_compositor.o kdu_region_decompressor.o ssse3_region_decompressor.o avx2_region_decompressor.o kdu_stripe_compressor.o kdu_stripe_decompressor.o ssse3_stripe_transfer.o avx2_stripe_transfer.o
    CACHE_OBJS   = kdu_cache.o
    CLIENT_SERVER_OBJS = kdu_client_window.o kdcs_comms.o
    CLIENT_OBJS  = kdu_client.o kdu_clientx.o
    SERVER_OBJS  = kdu_serve.o kdu_servex.o
    
    ALL_OBJS = $(JP2_OBJS) $(IMAGE_OBJS) $(SUPPORT_OBJS)
    ALL_OBJS += $(CACHE_OBJS) $(CLIENT_SERVER_OBJS) $(CLIENT_OBJS) $(SERVER_OBJS)
    ALL_OBJS += args.o
    
    clean:
    	rm -f *.o *.so *.dll *.a rm *.jnilib
    
    kdu_hyperdoc :: ../../apps/kdu_hyperdoc/kdu_hyperdoc.cpp ../../apps/kdu_hyperdoc/jni_builder.cpp ../../apps/kdu_hyperdoc/mni_builder.cpp ../../apps/kdu_hyperdoc/aux_builder.cpp ../../coresys/messaging/messaging.cpp ../../apps/args/args.cpp
    	$(CC) $(C_OPT) \
    	      -I../../coresys/common -I../../apps/args \
    	      ../../apps/kdu_hyperdoc/kdu_hyperdoc.cpp \
    	      ../../apps/kdu_hyperdoc/jni_builder.cpp \
    	      ../../apps/kdu_hyperdoc/mni_builder.cpp \
    	      ../../apps/kdu_hyperdoc/aux_builder.cpp \
    	      ../../coresys/messaging/messaging.cpp \
    	      ../../apps/args/args.cpp \
    	      -o $(BIN_DIR)/kdu_hyperdoc -lm
    	echo Building Documentation and Java Native API ...
    	cd ../../documentation;	\
    	   ../managed/make/$(BIN_DIR)/kdu_hyperdoc \
    	     -o html_pages -s hyperdoc.src \
    	     -java ../../java/kdu_jni ../managed/kdu_jni ../managed/kdu_aux \
    	     ../managed/all_includes
    
    $(AUX_SHARED_LIB_NAME) :: ../kdu_aux/kdu_aux.cpp $(ALL_OBJS) $(LIB_SRC)
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      ../kdu_aux/kdu_aux.cpp \
    	      $(ALL_OBJS) $(LIB_SRC) \
    	      -shared -o $(AUX_SHARED_LIB_NAME) $(LIBS) $(LDFLAGS) $(NETLIBS)
    	cp $(AUX_SHARED_LIB_NAME) $(LIB_DIR)
    
    $(AUX_STATIC_LIB_NAME) :: ../kdu_aux/kdu_aux.cpp $(ALL_OBJS)
    	ar -rv $(LIB_DIR)/$(AUX_STATIC_LIB_NAME) $(ALL_OBJS)
    	ranlib $(LIB_DIR)/$(AUX_STATIC_LIB_NAME)
    
    $(JNI_LIB_NAME) :: ../kdu_jni/kdu_jni.cpp ../kdu_aux/kdu_aux.cpp $(ALL_OBJS) $(LIB_SRC)
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      ../kdu_jni/kdu_jni.cpp ../kdu_aux/kdu_aux.cpp \
    	      $(ALL_OBJS) $(LIB_SRC) -fno-strict-aliasing \
    	      -shared $(JNI_LINK_FLAGS) \
    	      -o $(JNI_LIB_NAME) $(LIBS) $(NETLIBS)
    	cp $(JNI_LIB_NAME) $(LIB_DIR)
    
    args.o :: ../../apps/args/args.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -I../../coresys/common \
    	      -c ../../apps/args/args.cpp -o args.o
    
    jp2.o :: ../../apps/jp2/jp2.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/jp2/jp2.cpp \
    	      -o jp2.o
    
    jpb.o :: ../../apps/jp2/jpb.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/jp2/jpb.cpp \
    	      -o jpb.o
    
    jpx.o :: ../../apps/jp2/jpx.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/jp2/jpx.cpp \
    	      -o jpx.o
    
    mj2.o :: ../../apps/jp2/mj2.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/jp2/mj2.cpp \
    	      -o mj2.o
    
    kdu_tiff.o :: ../../apps/image/kdu_tiff.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/image/kdu_tiff.cpp \
    	      -o kdu_tiff.o
    
    kdu_region_decompressor.o :: ../../apps/support/kdu_region_decompressor.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/kdu_region_decompressor.cpp \
    	      -o kdu_region_decompressor.o
    
    ssse3_region_decompressor.o :: ../../apps/support/ssse3_region_decompressor.cpp
    	$(CC) $(CFLAGS) $(SSSE3FLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/ssse3_region_decompressor.cpp \
    	      -o ssse3_region_decompressor.o
    
    avx2_region_decompressor.o :: ../../apps/support/avx2_region_decompressor.cpp
    	$(CC) $(CFLAGS) $(AVX2FLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/avx2_region_decompressor.cpp \
    	      -o avx2_region_decompressor.o
    
    kdu_region_compositor.o :: ../../apps/support/kdu_region_compositor.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/kdu_region_compositor.cpp \
    	      -o kdu_region_compositor.o
    
    avx2_region_compositor.o :: ../../apps/support/avx2_region_compositor.cpp
    	$(CC) $(CFLAGS) $(AVX2FLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/avx2_region_compositor.cpp \
    	      -o avx2_region_compositor.o
    
    kdu_stripe_decompressor.o :: ../../apps/support/kdu_stripe_decompressor.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/kdu_stripe_decompressor.cpp \
    	      -o kdu_stripe_decompressor.o
    
    kdu_stripe_compressor.o :: ../../apps/support/kdu_stripe_compressor.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/kdu_stripe_compressor.cpp \
    	      -o kdu_stripe_compressor.o
    
    ssse3_stripe_transfer.o :: ../../apps/support/ssse3_stripe_transfer.cpp
    	$(CC) $(CFLAGS) $(SSSE3FLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/ssse3_stripe_transfer.cpp \
    	      -o ssse3_stripe_transfer.o
    
    avx2_stripe_transfer.o :: ../../apps/support/avx2_stripe_transfer.cpp
    	$(CC) $(CFLAGS) $(AVX2FLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/support/avx2_stripe_transfer.cpp \
    	      -o avx2_stripe_transfer.o
    
    kdu_cache.o :: ../../apps/caching_sources/kdu_cache.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/caching_sources/kdu_cache.cpp \
    	      -o kdu_cache.o
    
    kdcs_comms.o :: ../../apps/client_server/kdcs_comms.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/client_server/kdcs_comms.cpp \
    	      -o kdcs_comms.o
    
    kdu_client_window.o :: ../../apps/client_server/kdu_client_window.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/client_server/kdu_client_window.cpp \
    	      -o kdu_client_window.o
    
    kdu_client.o :: ../../apps/kdu_client/kdu_client.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/kdu_client/kdu_client.cpp \
    	      -o kdu_client.o
    
    kdu_clientx.o :: ../../apps/kdu_client/kdu_clientx.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/kdu_client/kdu_clientx.cpp \
    	      -o kdu_clientx.o
    
    kdu_serve.o :: ../../apps/kdu_server/kdu_serve.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/kdu_server/kdu_serve.cpp \
    	      -o kdu_serve.o
    
    kdu_servex.o :: ../../apps/kdu_server/kdu_servex.cpp
    	$(CC) $(CFLAGS) $(LIB_IMPORTS) \
    	      -c ../../apps/kdu_server/kdu_servex.cpp \
    	      -o kdu_servex.o
    

     

    ozgunlu tarafından 15/Şub/16 11:51 tarihinde düzenlenmiştir

    Hello, i am nothing. I come from Neverland.
  2. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Mad Scientist
    AMpul
    AMpul's avatar
    Kayıt Tarihi: 31/Aralık/2009
    Erkek

    ./configure yaptiysan "make -f Makefile-Linux-x86-64-gcc" yazcaksin. Makefile-Linux-x86-64-gcc dosyasi mesela mahmut klasorundeyse "make -f mahmut/Makefile-Linux-x86-64-gcc" seklinde relative path ver.


    What I cannot create, I do not understand. — Richard Feynman
  3. KısayolKısayol reportŞikayet pmÖzel Mesaj
    ozgunlu
    ozgunlu's avatar
    Banlanmış Üye
    Kayıt Tarihi: 11/Kasım/2011
    Erkek
    AMpul bunu yazdı

    ./configure yaptiysan "make -f Makefile-Linux-x86-64-gcc" yazcaksin. Makefile-Linux-x86-64-gcc dosyasi mesela mahmut klasorundeyse "make -f mahmut/Makefile-Linux-x86-64-gcc" seklinde relative path ver.

    ./configure yapınca arkadaş haklı olarak şunu diyor :

    root@easypath:/var/tmp/Kakadu/v7_7-01585N/make# ./configure

    bash: ./configure: No such file or directory

    ----------------------------

    make yapınca da (en azından yapabildim!) şöyle bi error aldım bi fikrin var mı ? : 

     

    Ayrıca relative path math vermedim, cd ile o path' in içine huzurlu bir yolculuk yaptım sonra meyki çaktım.

    ozgunlu tarafından 15/Şub/16 12:37 tarihinde düzenlenmiştir

    Hello, i am nothing. I come from Neverland.
  4. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Mad Scientist
    AMpul
    AMpul's avatar
    Kayıt Tarihi: 31/Aralık/2009
    Erkek

    configure yi yanlis klasordeyken yapmisin, ust dizine cik, configure diye bir dosya olmasi lazim zaten

    sunlari calistir

    chmod +x configure

    ./configure

    make -f make/Makefile-Linux-x86-64-gcc

     


    What I cannot create, I do not understand. — Richard Feynman
  5. KısayolKısayol reportŞikayet pmÖzel Mesaj
    ozgunlu
    ozgunlu's avatar
    Banlanmış Üye
    Kayıt Tarihi: 11/Kasım/2011
    Erkek
    AMpul bunu yazdı

    configure yi yanlis klasordeyken yapmisin, ust dizine cik, configure diye bir dosya olmasi lazim zaten

    sunlari calistir

    chmod +x configure

    ./configure

    make -f make/Makefile-Linux-x86-64-gcc

     

    hocam darlamış gibi oldum seni de kusura bakma ama ne diye search edeceğimi bilemedim, detayları veriyim biraz daha :

    dosya yapısı (configure diye klasör yok) :

    compiling instruction da şöyle diyor :

    -- Makefiles are provided in the "make", "coresys/make",

           "apps/make" and "managed/make" directories.  You can use the makefiles

           in the top-level "make" directory to build everything -- these just

           invoke the more specific makefiles in the "coresys", "apps" and

           "managed" directories.  If you do not use the top-level makefiles, be

           sure to build in the following order: "coresys" then "apps" then

           "managed" (actually, you can omit "apps" if you like).

        -- Error and warning free compilation should occur using recent

           releases of gcc or clang.  You will need at least GCC 4.8 in order

           to build this version of Kakadu.

    Şimdi bendeki GCC versiyonu :

     

    Bunla ilgisi var midir bilmiyorum ama apt-get update yaptım, versiyonu yükselmedi.

    Bu arada yine rule hatası verdi, configure' yi nasıl yapabilirim bilmiyorum. configure diye klasör yok :/

     


    Hello, i am nothing. I come from Neverland.
  6. KısayolKısayol reportŞikayet pmÖzel Mesaj
    ozgunlu
    ozgunlu's avatar
    Banlanmış Üye
    Kayıt Tarihi: 11/Kasım/2011
    Erkek

    Böyle bi yanıt buldum da (sdk yı yazan adamın yanıtı) : 

    You need GCC4.3 or above. Simple as that. The only other work around
    would be to completely disable multi-threading which is highly inadvisable.
    All modern compilers support atomics.

     

    Ben gcc versiyonunu yükselttim :

     

    ama hala atomic hatası veriyor (yukarda verdiğim hata), ubuntu 12.04, çok vaktim gitti şuna, biri yardımcı olsun yav :(

     

    ÇÖZDÜM

    Beyfendi hazretleri Gcc 4.9 istiyormuş, compiling instructions da en az 4.8 olmalı diye biz de 4.8' e çıkardık. Çünkü son versiyonunun kaç olduğunu bilmiyordum, neyse gcc 4.9' a update edince oldu. Ama "./configure" falan yazmadım. Ne işe yarıyor bunlar merak da etmiyor değilim ama sağolsun 3 saatimi çöp etti.

    ozgunlu tarafından 15/Şub/16 14:45 tarihinde düzenlenmiştir

    Hello, i am nothing. I come from Neverland.
Toplam Hit: 1397 Toplam Mesaj: 6
linux makefile derleme