ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gffread/Makefile
Revision: 6
Committed: Mon Mar 22 22:07:27 2010 UTC (10 years ago) by gpertea
File size: 1251 byte(s)
Log Message:
added gffread sources

Line User Rev File contents
1 gpertea 6 # Useful directories
2    
3     THISCODEDIR := .
4     GCLDIR := ../gclib
5     SEARCHDIRS := -I${THISCODEDIR} -I${GCLDIR}
6    
7     SYSTYPE := $(shell uname)
8    
9     MACHTYPE := $(shell uname -m)
10     ifeq ($(MACHTYPE), i686)
11     MARCH = -march=i686
12     else
13     MARCH =
14     endif
15    
16    
17     CC := g++
18     BASEFLAGS = -Wall ${SEARCHDIRS} $(MARCH) -D_FILE_OFFSET_BITS=64 \
19     -D_LARGEFILE_SOURCE -fno-exceptions -fno-rtti -fno-strict-aliasing \
20     -D_REENTRANT
21    
22    
23     ifeq ($(findstring debug,$(MAKECMDGOALS)),)
24     CFLAGS = -O2 -DNDEBUG $(BASEFLAGS)
25     LDFLAGS =
26     else
27     CFLAGS = -g -DDEBUG $(BASEFLAGS)
28     LDFLAGS = -g
29     endif
30    
31     %.o : %.c
32     ${CC} ${CFLAGS} -c $< -o $@
33    
34     %.o : %.cc
35     ${CC} ${CFLAGS} -c $< -o $@
36    
37     %.o : %.C
38     ${CC} ${CFLAGS} -c $< -o $@
39    
40     %.o : %.cpp
41     ${CC} ${CFLAGS} -c $< -o $@
42    
43     %.o : %.cxx
44     ${CC} ${CFLAGS} -c $< -o $@
45    
46     # C/C++ linker
47    
48     LINKER := g++
49     LIBS =
50     OBJS = ${GCLDIR}/gff.o ${GCLDIR}/gdna.o ${GCLDIR}/codons.o \
51     ${GCLDIR}/GBase.o ${GCLDIR}/GFaSeqGet.o ${GCLDIR}/GStr.o \
52     ${GCLDIR}/GArgs.o ${GCLDIR}/gcdb.o ${GCLDIR}/GCdbYank.o ./gffread.o
53    
54     .PHONY : all
55     all: gffread
56     debug: gffread
57     gffread: ${OBJS}
58     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
59    
60     # target for removing all object files
61    
62     .PHONY : clean
63     clean::
64     @${RM} core core.* gffread gffread.exe *.o* ${OBJS}