aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/dummy-libxbmc/Makefile
blob: 9f4cbe3f7bac810a7474a43eaab8622c92ff66fd (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
include ../../Makefile.include
VERSION.TXT := $(CMAKE_SOURCE_DIR)/version.txt
DEPS= ../../Makefile.include Makefile dummy-libxbmc.c $(VERSION.TXT)
APP_NAME=$(shell awk '/APP_NAME/ {print tolower($$2)}' $(VERSION.TXT))

LIBDYLIB=lib$(APP_NAME).so

all: $(PLATFORM)/$(LIBDYLIB) .installed-$(PLATFORM)

$(PLATFORM):
	mkdir -p $(PLATFORM)

$(PLATFORM)/$(LIBDYLIB): $(PLATFORM) $(DEPS)
	$(CC) -shared -o $(PLATFORM)/lib$(APP_NAME).so dummy-libxbmc.c

.installed-$(PLATFORM): $(PLATFORM)/$(LIBDYLIB)
	mkdir -p  $(PREFIX)/lib/dummy-lib$(APP_NAME)
	cp $(PLATFORM)/lib$(APP_NAME).so $(PREFIX)/lib/dummy-lib$(APP_NAME)
	touch $@

clean:
	rm -rf $(PLATFORM)
	rm -f .installed-$(PLATFORM)

distclean::
	rm -rf $(PLATFORM) .installed-$(PLATFORM)