ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/fqtrim/Makefile
Revision: 103
Committed: Mon Oct 10 19:33:39 2011 UTC (8 years, 7 months ago) by gpertea
File size: 1515 byte(s)
Log Message:
wip

Line User Rev File contents
1 gpertea 4 # Useful directories
2    
3     THISCODEDIR := .
4     GCLDIR := ../gclib
5     # Directory where libz.a can be found
6     # (please build that first before making this package)
7     # ZDIR := ../zlib
8     # Directories to search for header files
9     #SEARCHDIRS := -I${ZDIR} -I${THISCODEDIR} -I${GCLDIR}
10     SEARCHDIRS := -I${THISCODEDIR} -I${GCLDIR}
11    
12     SYSTYPE := $(shell uname)
13    
14     # C compiler
15    
16     MACHTYPE := $(shell uname -m)
17     ifeq ($(MACHTYPE), i686)
18     MARCH = -march=i686
19     else
20     MARCH =
21     endif
22    
23     # CVS checked in
24     CC := g++
25 gpertea 103 BASEFLAGS = -Wall -Wextra -Wuninitialized ${SEARCHDIRS} $(MARCH) -D_FILE_OFFSET_BITS=64 \
26 gpertea 4 -D_LARGEFILE_SOURCE -fno-exceptions -fno-rtti -fno-strict-aliasing \
27     -D_REENTRANT
28    
29    
30     ifeq ($(findstring debug,$(MAKECMDGOALS)),)
31 gpertea 103 CFLAGS = -DNDEBUG -O2 $(BASEFLAGS)
32 gpertea 4 LDFLAGS =
33     else
34 gpertea 12 CFLAGS = -g -DDEBUG $(BASEFLAGS)
35 gpertea 4 LDFLAGS = -g
36     endif
37    
38     %.o : %.c
39     ${CC} ${CFLAGS} -c $< -o $@
40    
41     %.o : %.cc
42     ${CC} ${CFLAGS} -c $< -o $@
43    
44     %.o : %.C
45     ${CC} ${CFLAGS} -c $< -o $@
46    
47     %.o : %.cpp
48     ${CC} ${CFLAGS} -c $< -o $@
49    
50     %.o : %.cxx
51     ${CC} ${CFLAGS} -c $< -o $@
52    
53     # C/C++ linker
54    
55     LINKER := g++
56     LIBS =
57    
58     #OBJS = ${GCLDIR}/gdna.o ${GCLDIR}/codons.o ${GCLDIR}/GArgs.o \
59     # ${GCLDIR}/GBase.o ${GCLDIR}/GStr.o
60 gpertea 103 OBJS = ${GCLDIR}/GBase.o ${GCLDIR}/GArgs.o ${GCLDIR}/GStr.o \
61     ${GCLDIR}/GAlnExtend.o
62 gpertea 4
63     .PHONY : all
64     all: fqtrim
65     debug: all
66    
67     fqtrim: ${OBJS} ./fqtrim.o
68     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
69     # target for removing all object files
70    
71     .PHONY : clean
72     clean::
73     @${RM} core core.* fqtrim.exe fqtrim ${OBJS} *.o* *.~*