ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/fqtrim/Makefile
Revision: 4
Committed: Mon Mar 22 22:05:23 2010 UTC (12 years, 4 months ago) by gpertea
File size: 1469 byte(s)
Log Message:
initial commit

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     BASEFLAGS = -Wall ${SEARCHDIRS} $(MARCH) -D_FILE_OFFSET_BITS=64 \
26     -D_LARGEFILE_SOURCE -fno-exceptions -fno-rtti -fno-strict-aliasing \
27     -D_REENTRANT
28    
29    
30     ifeq ($(findstring debug,$(MAKECMDGOALS)),)
31     CFLAGS = -O2 -DNDEBUG $(BASEFLAGS)
32     LDFLAGS =
33     else
34     CFLAGS = -g -O2 -DDEBUG $(BASEFLAGS)
35     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     OBJS = ${GCLDIR}/GBase.o ${GCLDIR}/GArgs.o ${GCLDIR}/GStr.o
61    
62     .PHONY : all
63     all: fqtrim
64     debug: all
65    
66     fqtrim: ${OBJS} ./fqtrim.o
67     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
68     # target for removing all object files
69    
70     .PHONY : clean
71     clean::
72     @${RM} core core.* fqtrim.exe fqtrim ${OBJS} *.o* *.~*