help-gplusplus
[Top][All Lists]
Advanced

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

makefile for c++ programs.


From: Amit Bhatia
Subject: makefile for c++ programs.
Date: Wed, 27 Jul 2005 10:52:37 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Hello,
I am sorry to be posting this to this grp as I could not find any group for such queries in mac based forums.
  I am using os 10.3.
I wish to make a Makefile for compiling c++ programs. I use simple emacs interface for writing all the code and terminal to compile them. I have used a Makefile on linux systems for the same. just wondering how to change it: many of the things would be changed or would be in different locations.

any suggestions? do people normally use configure or something to make these makefiles?

 for linux(RH 9.0) my makefile looked like:


# This file was generated automatically by configure.  Do not edit.
VPATH = .
#
#       Makefile
#
RDEV_ROOT =/home/code
#### package, host, target, and site dependent Makefile fragments come in here.
#-----------------------------#
# Package fragment for LPSOLVE#
#-----------------------------#
LPSOLVE_ROOT      = $(RDEV_ROOT)/Packages/lp_solve_4.0
LPSOLVE_INCL      = -I$(LPSOLVE_ROOT)
LPSOLVE_DEFS      =
LPSOLVE_BUILD    = -L$(LPSOLVE_ROOT)
LPSOLVE_ARCHIVE = $(LPSOLVE_ROOT)/liblpk.a

CC              = gcc
CFLAGS         =  -c -g -fwritable-strings -static -ansi -pedantic

G         = g++
CXX             = g++
#CXXFLAGS = -c -g -fwritable-strings -Wno-deprecated -static -ansi -pedantic
CXXFLAGS    =  -c -pg -O -Wno-deprecated -ansi -pedantic
DEPENDSFLAG    = -M -Wno-deprecated
CXXLINKFLAGS    =  -pg  -O -Wno-deprecated  -ansi -pedantic

LD              = g++
LDFLAGS        =

#DLFLAGS= -Wl,-rpath,$(XERCES_ROOT)/lib -Wl,-rpath,$(OPTPP_ROOT)/tests/xml -Wl,-export-dynamic
DLLIBS        = -ldl -lpthread

SOFLAGS = -g -fwritable-strings -Wno-deprecated -ansi -pedantic -fPIC -shared

AR        = ar ruv
RANLIB        = ranlib

ARCH        = IX86
ARCH_DEFINES      = -DANSI_HEADERS -D_G_HAVE_BOOL
ARCH_INCLUDES     =
ARCH_LIBS         = -lm

#---------------------------------------#
# Host OS-dependent definitions - LINUX #
#---------------------------------------#

AWK    = awk
CAT    = cat -s
CD    = cd
CHMOD    = chmod 664
CP    = cp -p
ECHO    = /bin/echo
EGREP    = egrep
FGREP    = fgrep -v
GREP    = grep -s
LN    = ln -s
LS    = ls -lF
MAKE    = make
MKDIR    = mkdir -m 775
MV    = mv
RM    = rm -f
SED    = sed -e
SHELL = /bin/sh
SLEEP    = sleep
TAR_CPY    = tar -cvf
TAR_LST    = tar -tvf
TAR_XTR    = tar -xvf
TOUCH    = touch -m



thanks,
amit.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]