summaryrefslogtreecommitdiff
path: root/cgats/Makefile
blob: 531210450452a4682e0837bfc893e2b567fbb6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# UNIX style makefile, for icclib and friends.
# "include" the right environment for your system,
# by uncommenting the appropriate line:

# Microsoft C++, WinNT setup
#include Makefile.WNT

# IBM C++, WinNT setup
include Makefile.IBMNT

# Generic UNIX setup
#include Makefile.UNIX

# Apple OSX
#include Makefile.OSX

###############################

#Compile with separate stndard malloc & file io
#CCDEFINES = $(DEFFLAG)SEPARATE_STD

#Set optimisation on
CCFLAGS = $(CCFLAGSDEF) $(CCOPTFLAG) $(CCDEFINES)

#Set debugging on
#CCFLAGS = $(CCFLAGSDEF) $(CCDEBUGFLAG) $(CCDEFINES)

STDHDRS = $(STDHDRSDEF)
LINKFLAGS = $(LINKFLAGSDEF) $(LINKDEBUGFLAG)

all:: libcgats$(SUFLIB) pars$(SUFEXE) cgats$(SUFEXE)


# Separate for executables
parsstd$(SUFOBJ): parsstd.c pars.h
	$(CC) $(CCOF)parsstd$(SUFOBJ) parsstd.c

cgatsstd$(SUFOBJ): cgatsstd.c cgats.h pars.h
	$(CC) $(CCOF)cgatsstd$(SUFOBJ) cgatsstd.c


pars$(SUFOBJ): pars.c pars.h
	$(CC) $(CCOF)pars$(SUFOBJ) pars.c

cgats$(SUFOBJ): cgats.c cgats.h pars.h
	$(CC) $(CCOF)cgats$(SUFOBJ) cgats.c


libcgats$(SUFLIB): pars$(SUFOBJ) cgats$(SUFOBJ)
	$(LIBU) $(LIBOF)libcgats$(SUFLIB) cgats$(SUFOBJ) pars$(SUFOBJ)
	$(RANLIB) libcgats$(SUFLIB)


sa_pars$(SUFOBJ): pars.c pars.h
	$(CC) $(CCOF)sa_pars$(SUFOBJ) $(DEFFLAG)STANDALONE_TEST pars.c

pars$(SUFEXE): sa_pars$(SUFOBJ) parsstd$(SUFOBJ)
	$(LINK) $(LINKOF)pars$(SUFEXE) sa_pars$(SUFOBJ) parsstd$(SUFOBJ) $(LINKLIBS)


sa_cgats$(SUFOBJ): cgats.c cgats.h pars.h
	$(CC) $(CCOF)sa_cgats$(SUFOBJ) $(DEFFLAG)STANDALONE_TEST cgats.c

cgats$(SUFEXE): sa_cgats$(SUFOBJ) pars$(SUFOBJ) parsstd$(SUFOBJ) cgatsstd$(SUFOBJ)
	$(LINK) $(LINKOF)cgats$(SUFEXE) sa_cgats$(SUFOBJ) pars$(SUFOBJ) parsstd$(SUFOBJ) \
                                    cgatsstd$(SUFOBJ) $(LINKLIBS)