Use daemon() instead of fork(), and don't fork until hama_mce has control over the...
[hama_mce-eventclient.git] / Makefile
blobe04e7e170b322eb282f8dbc31d04297c09c7afa1
1 CPP := g++
2 PWD := `pwd`
3 PREFIX := /usr
5 export PATH := $(PWD)/bin:$(PATH)
6 export PKG_CONFIG_PATH := $(PWD)/lib/pkgconfig
8 CFLAGS += -I$(PWD)/3rdparty/include
9 LFLAGS += -L$(PWD)/3rdparty/lib -lusb-1.0 -lpthread -lrt
11 all: hama_mce
13 install : hama_mce
14 install -m 644 hama_mce.rules /etc/udev/rules.d/
15 install -m 755 99_hama_mce /etc/pm/sleep.d/
16 install -m 644 hama_mce.xml $(HOME)/.xbmc/userdata/keymaps/
17 install hama_mce $(PREFIX)/sbin/
19 % : %.cpp
20 $(CPP) -o $@ $< $(CFLAGS) $(LFLAGS)
22 hama_mce.cpp : 3rdparty/include/libusb-1.0/libusb.h
24 3rdparty/include/libusb-1.0/libusb.h :
25 ( cd ./3rdparty && make -f Makefile.libusb-1.0 )