Makefile.mac
author sl
Mon, 19 May 2014 21:10:35 +0200
changeset 0 b112defa99c0
permissions -rw-r--r--
Renamed testgui from hidapi to FutabaVfd.
sl@0
     1
###########################################
sl@0
     2
# Simple Makefile for HIDAPI test program
sl@0
     3
#
sl@0
     4
# Alan Ott
sl@0
     5
# Signal 11 Software
sl@0
     6
# 2010-07-03
sl@0
     7
###########################################
sl@0
     8
sl@0
     9
all: hidapi-testgui
sl@0
    10
sl@0
    11
CC=gcc
sl@0
    12
CXX=g++
sl@0
    13
COBJS=../mac/hid.o
sl@0
    14
CPPOBJS=test.o
sl@0
    15
OBJCOBJS=mac_support_cocoa.o
sl@0
    16
OBJS=$(COBJS) $(CPPOBJS) $(OBJCOBJS)
sl@0
    17
CFLAGS=-I../hidapi -Wall -g -c `fox-config --cflags`
sl@0
    18
LDFLAGS=-L/usr/X11R6/lib
sl@0
    19
LIBS=`fox-config --libs` -framework IOKit -framework CoreFoundation -framework Cocoa
sl@0
    20
sl@0
    21
sl@0
    22
hidapi-testgui: $(OBJS) TestGUI.app
sl@0
    23
	g++ -Wall -g $(OBJS) $(LIBS) $(LDFLAGS) -o hidapi-testgui
sl@0
    24
	./copy_to_bundle.sh
sl@0
    25
	#cp TestGUI.app/Contents/MacOS/hidapi-testgui  TestGUI.app/Contents/MacOS/tg
sl@0
    26
	#cp start.sh TestGUI.app/Contents/MacOS/hidapi-testgui
sl@0
    27
sl@0
    28
$(COBJS): %.o: %.c
sl@0
    29
	$(CC) $(CFLAGS) $< -o $@
sl@0
    30
sl@0
    31
$(CPPOBJS): %.o: %.cpp
sl@0
    32
	$(CXX) $(CFLAGS) $< -o $@
sl@0
    33
sl@0
    34
$(OBJCOBJS): %.o: %.m
sl@0
    35
	$(CXX) $(CFLAGS) -x objective-c++ $< -o $@
sl@0
    36
sl@0
    37
TestGUI.app: TestGUI.app.in
sl@0
    38
	rm -Rf TestGUI.app
sl@0
    39
	mkdir -p TestGUI.app
sl@0
    40
	cp -R TestGUI.app.in/ TestGUI.app
sl@0
    41
sl@0
    42
clean:
sl@0
    43
	rm -f $(OBJS) hidapi-testgui
sl@0
    44
	rm -Rf TestGUI.app
sl@0
    45
sl@0
    46
.PHONY: clean