1
########################################################################
2
# demo makefile for NCBI applications
4
# This assumes the following variables are set in a file called "ncbi.mk"
5
# which is included by this one. In this case it resides in a directory
6
# set by the environment variable "NCBI"
8
# NCBI_CC = default compiler to use
9
# NCBI_CFLAGS1 = default compiler switches (not optimization)
10
# NCBI_LDFLAGS1 = default compiler switches when linking (not optimization)
11
# NCBI_OPTFLAG = default optimization (-O)
12
# NCBI_INCDIR = default toolkit include paths
13
# NCBI_LIBDIR = default toolkit library paths
14
# NCBI_ALTLIB = debugging toolkit library paths
15
# NCBI_VIBFLAG = additional include paths/defines for Vibrant apps
16
# NCBI_VIBLIBS = additional libraries needed to link Vibrant apps
17
# NCBI_OTHERLIBS = additional libraries needed to link the system
19
# This enables platform independent makefiles for ncbi toolkit apps. You
20
# can change any default behavior by setting the variable on the command
23
# Use gcc complier. "make NCBI_CC=gcc" or "make CC=gcc"
24
# Change optimization to debug
25
# "make NCBI_OPTFLAG="-g" NCBI_LIBPATH=$NCBI_ALTLIB"
27
# "make OPTFLAG="-g" LIBPATH=$NCBI_ALTLIB"
29
# You can also change the behavior permanently in the makefile by changing
30
# the assignment of the internal variable to the one from the include
34
# Change CC=$(NCBI_CC)
36
# in the makefile itself
38
# Make debugging version
40
# LIBPATH=$(NCBI_ALTDIR)
42
# Current settings are:
48
# NCBI_INCPATH = "/usr/ncbi/include/NCBI"
49
# NCBI_LIBPATH = "/usr/ncbi/lib"
50
# NCBI_ALTLIB = "/am/ncbi/altlib"
51
# NCBI_VIBFLAG = "-I/am/Motif/include -L/am/Motif/lib -DWIN_MOTIF"
52
# NCBI_VIBLIBS = "-lXm -lXmu -lXt -lX11"
53
# NCBI_OTHERLIBS = "-lm"
60
# NCBI_INCPATH = "/usr/ncbi/include/NCBI"
61
# NCBI_LIBPATH = "/usr/ncbi/lib"
62
# NCBI_ALTLIB = "/am/ncbi/altlib"
63
# NCBI_VIBFLAG = "-I/am/Motif/include -L/am/Motif/lib -DWIN_MOTIF"
64
# NCBI_VIBLIBS = "-lXm -lXmu -lXt -lX11"
65
# NCBI_OTHERLIBS = "-lm -lPW -lsun"
69
# NCBI_CFLAGS1 = "-c -Xa"
70
# NCBI_LDFLAGS1 = "-Xa"
72
# NCBI_INCPATH = "/netopt/ncbi_tools/ver0.0/ncbi/include/NCBI"
73
# NCBI_LIBPATH = "/netopt/ncbi_tools/ver0.0/ncbi/lib"
74
# NCBI_ALTLIB = "/netopt/ncbi_tools/ver0.0/ncbi/altlib"
75
# NCBI_VIBFLAG = "-I/netopt/X11R5/include -I/netopt/Motif1.2.2/include -L/netopt/X11R5/lib -L/netopt/Motif1.2.2/lib -DWIN_MOTIF"
76
# NCBI_VIBLIBS = "-lXm -lXmu -lXt -lX11"
77
# NCBI_OTHERLIBS = "-lm -lsocket -lnsl"
79
#######################################################################
81
# default flags for compiling and loading
83
#######################################################################
85
include $(NCBI)/ncbi.mk
88
CFLAGS1 = $(NCBI_CFLAGS1)
89
LDFLAGS1 = $(NCBI_LDFLAGS1)
90
OPTFLAG = $(NCBI_OPTFLAG)
91
OTHERLIBS = $(NCBI_OTHERLIBS)
92
VIBLIBS= $(NCBI_VIBLIBS)
93
VIBFLAG= $(NCBI_VIBFLAG)
94
INCPATH = $(NCBI_INCDIR)
95
LIBPATH = $(NCBI_LIBDIR)
97
CFLAGS = $(CFLAGS1) $(OPTFLAG) -I$(INCPATH) $(VIBFLAG)
98
LDFLAGS = -I$(INCPATH) $(OPTFLAG) -L$(LIBPATH) $(VIBFLAG)
100
# all NCBI libraries aliased for easy access here
111
# LIB10 is reserved for NCSA socket library
119
## To clean out the directory without removing make
124
## if need a .o, compile the .c
130
#####################################################################
132
## Here is where you set up your own things to make
134
#####################################################################
136
## Default thing to make will be "all", in this case it checks that the
137
## source files exist, then tries to make "testcds"
144
## make individual applications and components
147
## These are non-vibrant versions
150
$(CC) -o asn2asn $(LDFLAGS) asn2asn.c $(LIB2) $(LIB1) $(OTHERLIBS)
152
asn2asn.pure : asn2asn.c
153
purify3 $(CC) -o asn2asn.pure $(LDFLAGS) asn2asn.c $(LIB2) $(LIB1) $(OTHERLIBS)
155
## these are vibrant versions
159
$(CC) -o asn2asn $(LDFLAGS) asn2asn.c $(LIB4) $(LIB2) $(LIB1) $(OTHERLIBS)
161
asn2asnv.pure : asn2asn.c
162
purify3 $(CC) -o asn2asn.pure $(LDFLAGS) asn2asn.c $(LIB4) $(LIB2) $(LIB1) $(OTHERLIBS)