modified: nfig1.py
[GalaxyCodeBases.git] / c_cpp / faststater / Makefile
blob4f87d97909449a5a2e9b817157be83e017ee3120
1 #CC = gcc
2 CFLAGS = -Wall -pipe -march=core2 -mtune=generic
3 LDFLAGS = -lz -lm
4 OPT = -O3
6 UNAME_S := $(shell uname -s)
7 ifeq ($(UNAME_S),Darwin)
8 CC=gcc-8
9 CFLAGS += -I/usr/local/include
10 LDFLAGS += -L/usr/local/lib -largp
11 endif
13 OBJDIR = ./objects/
15 MAKEARG = $(CFLAGS) $(OPT)
17 cobjects =
18 c99objects = ./objects/gFileIO.o
19 mainobjects = ./objects/fcount.o ./objects/gcount.o
20 objects = $(cobjects) $(c99objects)
21 exefiles = readsCounter homopolymerCounter
23 all: clean $(objects) $(exefiles)
25 readsCounter: $(objects) $(mainobjects)
26 $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o readsCounter $(objects) ./objects/fcount.o
27 homopolymerCounter: $(objects) $(mainobjects)
28 $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o homopolymerCounter $(objects) ./objects/gcount.o
30 $(cobjects): $(OBJDIR)%.o: %.c
31 $(CC) $(MAKEARG) -c $< -o $@
33 $(c99objects) $(mainobjects): $(OBJDIR)%.o: %.c
34 $(CC) -std=gnu99 $(MAKEARG) -c $< -o $@
36 debug: override MAKEARG := $(CFLAGS) -O -D DEBUG -g
37 debug: all
39 .PHONY : clean
40 clean:
41 -rm $(exefiles) $(mainobjects) $(objects)
42 @mkdir -p $(OBJDIR)