summaryrefslogtreecommitdiffstats
path: root/features/qtservice.flm
blob: 9d3ae409055f3e36d579cefc972f418c5df201ca (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
# /****************************************************************************
# **
# ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
# ** Contact: 
# **
# ****************************************************************************/

# FLM to be used for registering/unregistering QtServiceFW services build time
SFWTOOL := $(EPOCROOT)/epoc32/tools/servicedbgen$(DOTEXE)

#choose target database to deal with
ifeq ($(PLATFORM), WINSCW)
QTSERVICE_TARGET := -twinscw
DES_PATH := ${EPOCROOT}/epoc32/winscw/c/private/2002AC7F/des/$(QTSERVICE_DESCRIPTOR)
RELEASEABLES := ${EPOCROOT}/epoc32/winscw/c/private/2002AC7F/QtServiceFramework_4.8_system.db
else
ifeq ($(PLATFORM), ARMV5)
QTSERVICE_TARGET := -tarmv5
DES_PATH := $(EPOCROOT)/epoc32/data/z/private/2002AC7F/des/$(QTSERVICE_DESCRIPTOR)
RELEASEABLES := $(EPOCROOT)/epoc32/data/z/private/2002AC7F/QtServiceFramework_4.8_system.db
else
QTSERVICE_TARGET := -tall
DES_PATH := $(EPOCROOT)/epoc32/data/z/private/2002AC7F/des/$(QTSERVICE_DESCRIPTOR)
RELEASEABLES := $(EPOCROOT)/epoc32/data/z/private/2002AC7F/QtServiceFramework_4.8_system.db
endif
endif

define handle_service

MAKEFILE::
	$(call startrule,add_service,FORCESUCCESS) \
	$(SFWTOOL) $(QTSERVICE_TARGET) $(QTSERVICE_INITIALIZE) add $(DES_PATH) \
	$(call endrule,add_service)

CLEAN::
	$(call startrule,remove_service,FORCESUCCESS) \
	$(SFWTOOL) $(QTSERVICE_TARGET) $(QTSERVICE_INITIALIZE) remove $(DES_PATH)  \
	$(call endrule,remove_service)

endef

SINGLETON:=done_$(call sanitise,$(DES_PATH))

ifeq ($($(SINGLETON)),)
$(SINGLETON):=1
$(eval $(handle_service))
# this is going to cause some problems when several component are trying to register to the db...
$(eval $(call whatmacro,$(RELEASEABLES),WHATMAKEFILE))
endif