-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 733 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 733 Bytes
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
PYTHONVERSION=3.5m
CC=gcc
CFLAGS=-fpic -O2 -march=corei7-avx -mfpmath=sse
CPPFLAGS=-I. -I$(PYTHONDIR)/include/python$(PYTHONVERSION)
LD=ld
LDFLAGS=-shared
LIBS=-L$(PYTHONDIR)/lib -lpython$(PYTHONVERSION) -L$(SGE_ROOT)/lib/$(SGE_ARCH) -ldrmaa2 -lrt -lpthread -lm -ldl
SWIG=swig
SWIGINCLUDES=-I$(SGE_ROOT)/include
%.o : %.c drmaa2.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
%.py %_wrap.c : %.i
$(SWIG) -python $(SWIGINCLUDES) $<
all: _drmaa2.so
clean:
-/bin/rm -rf _drmaa2.so drmaa2.py* drmaa2_wrap.c drmaa2_wrap.o drmaa2.h __pycache__/
### Munge the system drmaa.h
drmaa2.h: $(SGE_ROOT)/include/drmaa2.h
-/bin/grep -v drmaa2_r_free $(SGE_ROOT)/include/drmaa2.h > $@
_drmaa2.so: drmaa2_wrap.o
$(LD) $(LDFLAGS) $< -o $@ $(LIBS)