$(ASM_OBJ): $(ASM_SRC)
$(CC) $(ASMFLAG) -c $^ -o $@
+GENERATED_CONFIG = include/api_config.h
GENERATED_HEADERS = include/api_id_mapping.h include/api_id_list.h include/id_list
-headers: $(GENERATED_HEADERS)
+headers: $(GENERATED_CONFIG) $(GENERATED_HEADERS)
rmheaders:
- rm -f $(GENERATED_HEADERS)
+ rm -f $(GENERATED_CONFIG) $(GENERATED_HEADERS)
+
+$(GENERATED_CONFIG): ./scripts/gen_api_config.sh
+ sh $< > $@
include/api_id_mapping.h: ./scripts/gen_api_id_mapping_header.awk
include/api_id_list.h: ./scripts/gen_api_id_mapping_header_list.awk
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Vasily Ulyanov <v.ulyanov@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - Samsung RnD Institute Russia
+ *
+ * Description:
+ * Test app for checking capi_appfw version. The new one has app_control_h
+ * type defined instead of service_h
+ *
+ */
+
+#include <app.h>
+
+int main(int argc, char *argv[])
+{
+ app_control_h __attribute__((unused)) handle;
+
+ return 0;
+}
#include "probeinfo.h"
#include "binproto.h"
#include "common_probe_init.h"
-
-/* FIXME think of a better solution for conditional build. */
-#ifndef PRIVATE_CAPI_APPFW
-
-#if !defined(service_h)
-#define PRIVATE_CAPI_APPFW
-#endif /* !service_h */
-
-#endif /* !PRIVATE_CAPI_APPFW */
+#include "api_config.h"
Ecore_Event_Handler *register_orientation_event_listener();
void unregister_orientation_event_listener(Ecore_Event_Handler *handler);
--- /dev/null
+#!/bin/sh
+
+function check_feature()
+{
+ FEATURE="$1"
+ SRC="$2"
+ OPTS="$3"
+
+ if gcc ${OPTS} -c ${SRC}; then
+ echo "#define ${FEATURE}"
+ else
+ echo "/* ${FEATURE} config not set */"
+ fi
+}
+
+NEW_CAPI_APPFW=$(check_feature PRIVATE_CAPI_APPFW \
+ ./feature_tests/new_capi_appfw.cpp \
+ -I/usr/include/appfw)
+
+API_CONFIG_DEFINES="
+${NEW_CAPI_APPFW}
+"
+
+cat << EOF
+/*
+ * Autogenerated header
+ */
+
+#ifndef __API_CONFIG__
+#define __API_CONFIG__
+${API_CONFIG_DEFINES}
+#endif /* __API_CONFIG__ */
+EOF