File: Makefile

package info (click to toggle)
clearsilver 0.10.5-1.4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,272 kB
  • ctags: 3,138
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 603; perl: 120; lisp: 34; sql: 21
file content (52 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download | duplicates (9)
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


ifeq ($(NEOTONIC_ROOT),)
NEOTONIC_ROOT = ..
endif

include $(NEOTONIC_ROOT)/rules.mk

NEO_UTIL_SO = neo_cgi.so
NEO_UTIL_PYD = neo_cgi.pyd
NEO_UTIL_SRC = neo_cgi.c neo_util.c neo_cs.c
NEO_UTIL_OBJ = $(NEO_UTIL_SRC:%.c=%.o)

CFLAGS += $(PYTHON_INC)
DLIBS += -lneo_cgi -lneo_cs -lneo_utl 
LIBS += $(DLIBS) $(DB2_LIB)

ifeq ($(USE_MINGW32),1)
TARGETS = $(NEO_UTIL_PYD)
else
TARGETS = $(NEO_UTIL_SO)
endif

all: $(TARGETS)

$(NEO_UTIL_SO): setup.py $(NEO_UTIL_SRC) $(DEP_LIBS)
	rm -f $(NEO_UTIL_SO)
	CC="$(CC)" LDSHARED="$(LDSHARED)" $(PYTHON) setup.py build_ext --inplace

OLD_NEO_UTIL_SO:
	$(LDSHARED) -o $@ $(LDFLAGS) $(NEO_UTIL_OBJ) $(LIBS)

setup:
	$(PYTHON) setup.py build_ext --inplace

$(NEO_UTIL_PYD): $(NEO_UTIL_OBJ) $(DEP_LIBS)
	dllwrap --dllname neo_cgi.pyd --driver-name gcc \
		--def neo_cgi.def -o neo_cgi.pyd \
		$(NEO_UTIL_OBJ) -s --entry _DllMain@12 \
		--target=i386-mingw32 \
		$(LDFLAGS) $(PYTHON_LIB) $(LIBS)

install: all
	$(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(PYTHON_SITE)
	$(INSTALL) $(TARGETS) $(DESTDIR)$(PYTHON_SITE)

clean:
	$(RM) *.o

distclean:
	$(RM) Makefile.depends $(TARGETS) *.o
	$(RM) -r build