Solved

Makefile help

Posted on 2010-08-24
4
616 Views
Last Modified: 2012-05-10
OOCFG=/home/y/share/ya_cfg
include $(OOCFG)/Make.defs

# Set the list of C++ source files here
CXXSRC  = \
        thFailed.C \
        ResponseCode.C \
        ia_log.C \
        dh_logger.C \
        p_th_plain.C \
        p_th_mycookie.C \
        p_th_myecookie.C \
        p_th_mycookieb64.C \
        p_th_mypki.C \
        mod_ail_p_th.C \
        p_th.C \
        $(NULL)

EXPORTED_LIBPATH_DISABLE=yes

LIB_NAME        = apache_mod_ail_p_th
SHLIB_VERSION = handler

LDEF    =  -g -O2 -Wall -Wimplicit -Werror -Wwrite-strings \
        $(LBSD_FLAG) -DEAPI $(EXTRALDEFS)  $(LDEBUGGING) \
        -D_FILE_OFFSET_BITS=64 \
                $(NULL)
#               -DDH_LOG

LINC    =       \
                -I$(ROOT)/include/ail/common \
                -I$(ROOT)/include/ail/rocket/common \
                -I$(ROOT)/include/ailext \
                -I/usr/local/include

LLDLIBS = \
                -lail_login \
                -lydod_login \
                -lailext \
                -lRocketStat \
                -lyax \
                -lyck \
                -lyprof \
                -lm \
                -lycfl \
                -lminers_dh_logconverter \
                -lminers_dh_log \
                                        $(NULL)

                        ifeq ($(YMK_OS),FreeBSD)
                        LLDLIBS += \
                                -lcompat \
                                -lminers_dh_ynet_sender \
                                $(NULL)
                        else
                        # Linux
                        LLDLIBS += \
                                -lyut_datetime \
                                $(NULL)
                        endif

                        # Set the following variables as necessary to customize this directory
                        # Do not add any build rules until *after* the include of Make.cfg
                        # If this is a directory with subdirectories to build, set SUBDIRS
                        SUBDIRS =

                        include $(OOCFG)/Make.rules
                        # Do not place any rules or targets above this line

                        # Include Buildyblocks rules
                        include /home/y/share/ya_cfg/buildyblocks/Make.rules
                        BUILDYBLOCKS_DIR=./build/buildyblocks
                        OS_PLATFORM=$(shell inst platform os)
                        STATE_FILE=build_$(OS_PLATFORM).state
                        HOST_NAME=apache_mod_ail_p_th.build.mail.corp.ya.com:apache_mod_ymai
                        l_p_th_$(OS_PLATFORM)_build

                        update-state-file:
                                /home/y/libexec/mail/ymGetBuildState.pl -host $(HOST_NAME) -directory $(
                        BUILDYBLOCKS_DIR) || exit $$?
                                /usr/local/bin/inst restore -file $(BUILDYBLOCKS_DIR)/$(STATE_FILE) ||
                        /home/y/bin/svn revert $(BUILDYBLOCKS_DIR)/$(STATE_FILE)
                                /home/y/bin/svn commit -m"Auto-updated $(BUILDYBLOCKS_DIR)/$(STATE_FILE)
                        " $(BUILDYBLOCKS_DIR)/$(STATE_FILE) || exit $$?

                        clean::
                                $(MAKE) -C ./unit-tests clean
                                $(MAKE) -C ./package clean
                                $(MAKE) -C ./package/conf clean

                        commit:: update-state-file clean all
                        
                        
                                $(MAKE) -C ./unit-tests cppunit
                                $(MAKE) -C ./package commit
                                $(MAKE) -C ./package/conf commit

                        SECONDARY_BIM=./build/buildyblocks/secondary_build.bim
                        secondary: BB_BIM_FILE=$(SECONDARY_BIM)

                        secondary-build: update-state-file clean all
                                $(MAKE) -C ./unit-tests cppunit
                                $(MAKE) -C ./package secondary

                        secondary-build-conf:
                                $(MAKE) -C ./package/conf secondary

                        ifeq ("$(OS)", "rhel")
                        secondary: secondary-build BB_Dist_Push
                        else
                        secondary: secondary-build secondary-build-conf BB_Dist_Push
                        endif
                                                
0
Comment
Question by:Vlearns
  • 2
4 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 33516907
Nice makefile - what's the question?
0
 

Author Comment

by:Vlearns
ID: 33516911
hi

i have the makefile above and i need to add code coverage using the coverity tool....
am new to makefiles and am trying to understand what this file is doing...

cxxsrc seems to indicate the code files

what do ldef, lic lldlibs do?

how do i add coverity to this makefile, has anyone ttied it before?
i am on freebsd

thanks


0
 
LVL 12

Accepted Solution

by:
w00te earned 500 total points
ID: 33522477
LDEF is a short macro/alias for your compiler commands, LLDLIBS seems to be a macro for pullin gin the required libraries (it does some based on OS type, so yours will follow the freeBSD path it has noted).  LINC looks like its pulling in headers common to the project.
OOCFG=/home/y/share/ya_cfg is another macro/alias for a directory which seems to contain the makefile with build rules:  Make.rules
clean:: nice macro that you can use such as:
make clean
to remove all files built by the make file when you run it.
and as you probably noticed, you can use these marcros/aliases after definition with the $(name) syntax.
-w00te
0
 
LVL 12

Expert Comment

by:w00te
ID: 33522492
and I've never used coverity, so I'm tagging out :p sorry man!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question