summaryrefslogtreecommitdiffhomepage
path: root/project/extras.mk
blob: f21467b87fb6dda60ac5b64ee4fc54dfce0d5ccb (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
CFLAGS_SHARED_ATTR	+= -DSLBT_PRE_ALPHA -DSLBT_BUILD
CFLAGS_STATIC_ATTR	+= -DSLBT_PRE_ALPHA -DSLBT_STATIC
CFLAGS_APP_ATTR		+= -DSLBT_APP

CFLAGS_MACHINE		:= -DSLBT_MACHINE=\"$(shell $(CC) $(CFLAGS) -dumpmachine)\"

src/driver/slbt_driver_ctx.o:	CFLAGS += $(CFLAGS_MACHINE)
src/driver/slbt_driver_ctx.lo:	CFLAGS += $(CFLAGS_MACHINE)

install-app-extras:	app
install-app-extras:	DBGNAME = dlibtool
install-app-extras:	LEGABITS = clibtool

install-app-extras:
	mkdir -p $(DESTDIR)$(BINDIR)

	rm -f bin/$(DBGNAME)$(OS_APP_SUFFIX).tmp
	rm -f bin/$(NICKNAME)-shared$(OS_APP_SUFFIX).tmp
	rm -f bin/$(NICKNAME)-static$(OS_APP_SUFFIX).tmp

	rm -f bin/$(LEGABITS)$(OS_APP_SUFFIX).tmp
	rm -f bin/$(LEGABITS)-shared$(OS_APP_SUFFIX).tmp
	rm -f bin/$(LEGABITS)-static$(OS_APP_SUFFIX).tmp

	ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(DBGNAME)$(OS_APP_SUFFIX).tmp
	ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(NICKNAME)-shared$(OS_APP_SUFFIX).tmp
	ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(NICKNAME)-static$(OS_APP_SUFFIX).tmp

	ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(LEGABITS)$(OS_APP_SUFFIX).tmp
	ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(LEGABITS)-shared$(OS_APP_SUFFIX).tmp
	ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(LEGABITS)-static$(OS_APP_SUFFIX).tmp

	mv bin/$(DBGNAME)$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(DBGNAME)$(OS_APP_SUFFIX)
	mv bin/$(NICKNAME)-shared$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(NICKNAME)-shared$(OS_APP_SUFFIX)
	mv bin/$(NICKNAME)-static$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(NICKNAME)-static$(OS_APP_SUFFIX)

	mv bin/$(LEGABITS)$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(LEGABITS)$(OS_APP_SUFFIX)
	mv bin/$(LEGABITS)-shared$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(LEGABITS)-shared$(OS_APP_SUFFIX)
	mv bin/$(LEGABITS)-static$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(LEGABITS)-static$(OS_APP_SUFFIX)