1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

linux make file

Discussion in 'Linux' started by heidik, Nov 22, 2010.

  1. heidik

    heidik New Member

    Hello everyone.

    I am new to creating make files. I have been able to create simple makefiles for those applications which do not involve database but am unable to create for the ones that do involve database. When I run that make file, it just deletes the .exe file of that application from the folder. Could anyone please help me with this.

    That's how my make file looks

    INCLUDES = -I/usr/include/mysql++ -I/usr/include/mysql
    LIBRARY = -L/usr/lib64/ -L/usr/lib64/mysql -lmysqlpp
    SOURCE = /usr/local/babbage/bin/BreachCheck
    OBJS = breachtester.o breachwriter.o cherrypicker.o datecl.o formatter.o frontrunner.o liffeconnect.o \
        liffe_runbreach.o logger.o positionmonitor.o reportwriter.o
    CC = g++
    DEBUG = -g
    CFLAGS = -Wall -c $(DEBUG)
    LFLAGS = -Wall $(DEBUG)
    liffe_runbreach-64bit : $(OBJS)
        $(CC) $(LFLAGS) $(OBJS) -o liffe_runbreach-64bit
    breachtester.o : breachtester.h breachtester.cpp breachwriter.h logger.h formatter.h \
            datecl.h liffeconnect.h 
            $(CC) $(INCLUDES) $(CFLAGS) breachtester.cpp
    breachwriter.o : breachwriter.h breachwriter.cpp breachtester.h liffeconnect.h
        $(CC) $(INCLUDES) $(CFLAGS) breachwriter.cpp
    cherrypicker.o : cherrypicker.h cherrypicker.cpp reportwriter.h
        $(CC) $(INCLUDES) $(CFLAGS) cherrypicker.cpp
    datecl.o : datecl.h datecl.cpp 
        $(CC) $(CFLAGS) datecl.cpp
    formatter.o : formatter.h formatter.cpp
        $(CC) $(CFLAGS) formatter.cpp
    frontrunner.o : frontrunner.h frontrunner.cpp liffeconnect.h reportwriter.h
        $(CC) $(INCLUDES) $(CFLAGS) frontrunner.cpp
    liffeconnect.o : liffeconnect.h liffeconnect.cpp logger.h formatter.h breachtester.h
        $(CC) $(INCLUDES) $(CFLAGS) liffeconnect.cpp
    logger.o : logger.h logger.cpp 
        $(CC) $(CFLAGS) logger.cpp
    positionmonitor.o : positionmonitor.h positionmonitor.cpp logger.h formatter.h
        $(CC) $(INCLUDES) $(CFLAGS) positionmonitor.cpp
    reportwriter.o : reportwriter.h reportwriter.cpp frontrunner.h liffeconnect.h
        $(CC) $(INCLUDES) $(CFLAGS) reportwriter.cpp
    liffe_runbreach.o : liffe_runbreach.cpp datecl.h logger.h breachtester.h liffeconnect.h formatter.h \
                breachwriter.h cherrypicker.h frontrunner.h reportwriter.h
        $(CC) $(INCLUDES) $(CFLAGS) liffe_runbreach.cpp
        \rm *.o *~ liffe_runbreach-64bit
        tar cfv liffe_runbreach-64bit.tar breachwriter.h breachwriter.cpp cherrypicker.h \
            cherrypicker.cpp logger.cpp logger.h breachtester.cpp breachtester.h datecl.h datecl.cpp \
            frontrunner.h frontrunner.cpp positionmonitor.h positionmonitor.cpp liffe_runbreach.cpp
  2. kumarmannu

    kumarmannu Banned

    I am new in linux please tell about shell scripting.

Share This Page