blob: 6d10be20826641e480b16548c2611ad4cf6db5fd (
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
69
|
# Cygwin/Linux-GCC Makefile
#
# $Id: Makefile 301 2010-09-30 13:09:13Z strubi $
#
# This is the GNU Makefile to create:
# - a Python module for the API tester
#
DEVLIB = ..
############################################################################
# Configure these to your needs
LIBNAME = dpf
DLLCSRCS =
COMMONSRCDIR = $(DEVLIB)/python
DLLINSTALLDIR = ../$(CONFIG)
DLLCOMMONSRCS = py_device.c
DEBUGOPTS = -g
ifdef DEBUG
DEBUGOPTS += -DDEBUG
endif
CLIENTLIB = -L$(DEVLIB)/dpflib -ldpf -lusb
############################################################################
MODULENAME = $(LIBNAME)
ifndef PLATFORM
PLATFORM=$(shell "uname")
endif
ifeq (Linux, $(PLATFORM))
PYTHON=$(shell pyversions -d)
include $(DEVLIB)/unixdll.mk
DLLDEPS = $(CLIENTLIB) -l$(PYTHON)
PYTHONINCLUDES = -I/usr/include/$(PYTHON)
else
PYTHONSRC = $(HOME)/src/EXTERN/Python26
ifeq (mingw32, $(PLATFORM))
include $(DEVLIB)/msdll.mk
PYTHONINCLUDES = -I$(PYTHONSRC)/include
CFLAGS += -DDLL_EXPORTS
DLLDEPS = -L$(PYTHONSRC)/libs -lpython26
DLLDEPS += $(CLIENTLIB) -lws2_32
DLLTOOL = i586-mingw32msvc-dlltool
DLLWRAP = i586-mingw32msvc-dllwrap
endif
endif
INCLUDES = -I$(DEVLIB)/include -I$(DEVLIB)/dpflib
INCLUDES += $(PYTHONINCLUDES)
CFLAGS += -DMODULENAME=$(MODULENAME)
CFLAGS += -Wall
all: dll
install:: installdll
@cp $(DLL) $(DLLINSTALLDIR)/$(INSTALLNAME)$(DLLEXT)
@echo -------------------------------------------------------------------
@echo Python module installed in:
@echo `pwd`/$(DLLINSTALLDIR)/$(INSTALLNAME)$(DLLEXT)
@echo -------------------------------------------------------------------
@echo
|