Skip to content

Commit

Permalink
Merge branch 'jb49564_fix_custom_build' into 'master'
Browse files Browse the repository at this point in the history
Keep dsme buildable without autotools

See merge request mer-core/dsme!38
  • Loading branch information
spiiroin committed Jun 15, 2020
2 parents 059b03b + 5d3e7e9 commit e9e5828
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 18 deletions.
8 changes: 8 additions & 0 deletions .depend
Expand Up @@ -349,6 +349,7 @@ modules/iphb.pic.o:\
modules/malf.o:\
modules/malf.c\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand All @@ -358,6 +359,7 @@ modules/malf.o:\
modules/malf.pic.o:\
modules/malf.c\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand Down Expand Up @@ -437,6 +439,7 @@ modules/pwrkeymonitor.pic.o:\
modules/runlevel.o:\
modules/runlevel.c\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand All @@ -445,6 +448,7 @@ modules/runlevel.o:\
modules/runlevel.pic.o:\
modules/runlevel.c\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand Down Expand Up @@ -483,6 +487,7 @@ modules/state.o:\
dsme/dsme-rd-mode.h\
dsme/utility.h\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand All @@ -499,6 +504,7 @@ modules/state.pic.o:\
dsme/dsme-rd-mode.h\
dsme/utility.h\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand Down Expand Up @@ -583,6 +589,7 @@ modules/thermalsensor_generic.pic.o:\
modules/upstart.o:\
modules/upstart.c\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand All @@ -591,6 +598,7 @@ modules/upstart.o:\
modules/upstart.pic.o:\
modules/upstart.c\
include/dsme/logging.h\
include/dsme/mainloop.h\
include/dsme/modulebase.h\
include/dsme/modules.h\
include/dsme/modules.h\
Expand Down
36 changes: 29 additions & 7 deletions Makefile.custom
Expand Up @@ -75,6 +75,21 @@ TARGETS_SBIN += getbootstate/getbootstate

TARGETS_ALL += $(TARGETS_PLUGIN) $(TARGETS_SBIN) $(TARGETS_BIN)

# DSME "core" features
PLUGIN_DEVEL_HEADERS += include/dsme/logging.h
PLUGIN_DEVEL_HEADERS += include/dsme/modulebase.h
PLUGIN_DEVEL_HEADERS += include/dsme/modules.h
PLUGIN_DEVEL_HEADERS += include/dsme/timers.h
PLUGIN_DEVEL_HEADERS += include/dsme/mainloop.h

# Features provided by plugins
PLUGIN_DEVEL_HEADERS += modules/dbusproxy.h
PLUGIN_DEVEL_HEADERS += modules/dsme_dbus.h

TARGETS_PLUGIN_DEVEL += dsme-plugin.pc

TARGETS_ALL += $(TARGETS_PLUGIN_DEVEL)

# ----------------------------------------------------------------------------
# Top level targets
# ----------------------------------------------------------------------------
Expand All @@ -93,7 +108,7 @@ distclean:: clean
mostlyclean::
$(RM) *.o *~ *.bak */*.o */*~ */*.bak

install :: install_main
install :: install_main install_plugin_devel

install_main::
# sbin executables
Expand All @@ -113,16 +128,18 @@ install_main::
install -d -m 755 $(DESTDIR)/etc/dbus-1/system.d
install -m 644 dsme/dsme.conf $(DESTDIR)/etc/dbus-1/system.d/

# devel headers dir
install -d -m 755 $(DESTDIR)/$(_INCLUDEDIR)/dsme-plugin

# dsme-plugin pkg-config file
install -D -m 644 dsme-plugin.pc $(DESTDIR)/$(_LIBDIR)/pkgconfig/dsme-plugin.pc

# tests
install -d -m 755 $(DESTDIR)/opt/tests/dsme-tests
install -m 644 tests/tests.xml $(DESTDIR)/opt/tests/dsme-tests

install_plugin_devel::
# devel headers dir
install -d -m 755 $(DESTDIR)$(_INCLUDEDIR)/dsme-plugin
install -m 644 $(PLUGIN_DEVEL_HEADERS) $(DESTDIR)$(_INCLUDEDIR)/dsme-plugin/

# dsme-plugin pkg-config file
install -D -m 644 dsme-plugin.pc $(DESTDIR)$(_LIBDIR)/pkgconfig/dsme-plugin.pc

# ----------------------------------------------------------------------------
# Build rules
# ----------------------------------------------------------------------------
Expand All @@ -132,6 +149,11 @@ install_main::
%.o : %.c ; $(CC) -o $@ -c $< $(CPPFLAGS) $(CFLAGS)
% : %.o ; $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
%.a : ; $(AR) ru $@ $^
% : %.in
sed < $< > $@\
-e 's:@VERSION@:${VERSION}:g'\
-e 's:@prefix@:${_PREFIX}:g'\
-e 's:@includedir@:${_INCLUDEDIR}:g'

# ----------------------------------------------------------------------------
# Preprocessor options
Expand Down
2 changes: 1 addition & 1 deletion dsme-plugin.pc.in
Expand Up @@ -5,4 +5,4 @@ Name: dsme-plugin-devel
Description: Header files for building DSME plugins
Version: @VERSION@
Requires:
Cflags: -I${includedir}/dsme-plugin
Cflags: -I${includedir}
10 changes: 0 additions & 10 deletions dsme_dbus_if.pc

This file was deleted.

0 comments on commit e9e5828

Please sign in to comment.