summaryrefslogtreecommitdiff
path: root/Makefile-mac
diff options
context:
space:
mode:
authorDonghoon Shin <dhs.shin@samsung.com>2016-09-19 17:36:01 +0900
committerDonghoon Shin <dhs.shin@samsung.com>2016-09-19 17:36:01 +0900
commite8acd13cc87ea038ecd6103e4088ce3cf5d501d7 (patch)
tree4c7c8cc683a297463996aa286f2f7758e8691b8f /Makefile-mac
parentb95c2492274542bc4718a863f5d88f37a0a788ab (diff)
downloadclewarecontrol-e8acd13cc87ea038ecd6103e4088ce3cf5d501d7.tar.gz
clewarecontrol-e8acd13cc87ea038ecd6103e4088ce3cf5d501d7.tar.bz2
clewarecontrol-e8acd13cc87ea038ecd6103e4088ce3cf5d501d7.zip
Change-Id: I59bac2188ffbfe5a2ad2d9dcb33847aabfaffe44
Diffstat (limited to 'Makefile-mac')
-rw-r--r--Makefile-mac39
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile-mac b/Makefile-mac
new file mode 100644
index 0000000..428e498
--- /dev/null
+++ b/Makefile-mac
@@ -0,0 +1,39 @@
+# $Revision: 100 $
+VERSION=4.1
+
+DEBUG=-g -W -pedantic #-pg #-fprofile-arcs
+LDFLAGS+=-framework IOKit -framework CoreFoundation
+CXXFLAGS+=-O3 -Wall -DVERSION=\"$(VERSION)\" $(DEBUG)
+CFLAGS+=$(CXXFLAGS)
+
+OBJS=main.o USBaccessBasic.o USBaccess.o error.o mac-hidapi/hid.o
+
+all: clewarecontrol
+
+clewarecontrol: $(OBJS)
+ $(CXX) $(OBJS) $(LDFLAGS) -o clewarecontrol
+
+cleware_python:
+ swig -c++ -python cleware.i
+ python setup.py build_ext --inplace
+ ./install-lib.py
+
+cleware_perl:
+ swig -c++ -perl5 cleware.i
+ g++ -c `perl -MConfig -e 'print join(" ", @Config{qw(ccflags optimize cccdlflags)}, "-I$$Config{archlib}/CORE")'` cleware_wrap.cxx USBaccessBasic.cpp USBaccess.cpp
+ g++ `perl -MConfig -e 'print $$Config{lddlflags}'` cleware_wrap.o USBaccessBasic.o USBaccess.o -o cleware.so
+ ./install-lib.pl
+
+dmg: clewarecontrol
+ rm -rf macosx
+ mkdir -p macosx
+ cp clewarecontrol clewarecontrol.1 macosx/
+ cp readme-mac.txt macosx/
+ rm -f clewarecontrol-$(VERSION).dmg
+ hdiutil create -srcfolder macosx -volname "ClewareControl" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size 1024k clewarecontrol-$(VERSION).dmg
+
+clean:
+ rm -rf $(OBJS) clewarecontrol core gmon.out *.da build cleware_wrap.cxx _cleware.so cleware.py* cleware.pm *.o cleware.so
+
+check:
+ cppcheck -v --enable=all --inconclusive -I. . 2> err.txt