Move i3-config-wizard to the new Makefile layout
This commit is contained in:
parent
e3b9ffe381
commit
0c2e4d8347
3
Makefile
3
Makefile
|
@ -2,7 +2,7 @@ TOPDIR=$(shell pwd)
|
|||
|
||||
include $(TOPDIR)/common.mk
|
||||
|
||||
SUBDIRS:=i3-msg i3-input i3-nagbar i3-config-wizard i3bar i3-dump-log
|
||||
SUBDIRS:=i3-msg i3-input i3-nagbar i3bar i3-dump-log
|
||||
|
||||
ALL_TARGETS =
|
||||
INSTALL_TARGETS =
|
||||
|
@ -13,6 +13,7 @@ all: real-all
|
|||
|
||||
include libi3/libi3.mk
|
||||
include src/i3.mk
|
||||
include i3-config-wizard/i3-config-wizard.mk
|
||||
|
||||
real-all: $(ALL_TARGETS) subdirs
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
ALL_TARGETS += i3-config-wizard/i3-config-wizard
|
||||
INSTALL_TARGETS += install-i3-config-wizard
|
||||
CLEAN_TARGETS += clean-i3-config-wizard
|
||||
|
||||
i3_config_wizard_SOURCES_GENERATED = i3-config-wizard/cfgparse.tab.c i3-config-wizard/cfgparse.yy.c
|
||||
i3_config_wizard_SOURCES := $(filter-out $(i3_config_wizard_SOURCES_GENERATED),$(wildcard i3-config-wizard/*.c))
|
||||
i3_config_wizard_HEADERS := $(wildcard i3-config-wizard/*.h)
|
||||
|
||||
i3_config_wizard_OBJECTS := $(i3_config_wizard_SOURCES_GENERATED:.c=.o) $(i3_config_wizard_SOURCES:.c=.o)
|
||||
|
||||
|
||||
i3-config-wizard/%.o: i3-config-wizard/%.c $(i3_config_wizard_HEADERS)
|
||||
echo "[i3-config-wizard] CC $<"
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
i3-config-wizard/cfgparse.yy.c: i3-config-wizard/cfgparse.l i3-config-wizard/cfgparse.tab.o $(i3_config_wizard_HEADERS)
|
||||
echo "[i3-config-wizard] LEX $<"
|
||||
$(FLEX) -i -o $@ $<
|
||||
|
||||
i3-config-wizard/cfgparse.tab.c: i3-config-wizard/cfgparse.y $(i3_config_wizard_HEADERS)
|
||||
echo "[i3-config-wizard] YACC $<"
|
||||
$(BISON) --debug --verbose -b $(basename $< .y) -d $<
|
||||
|
||||
i3-config-wizard/i3-config-wizard: libi3.a $(i3_config_wizard_OBJECTS)
|
||||
echo "[i3-config-wizard] Link i3-config-wizard"
|
||||
$(CC) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS)
|
||||
|
||||
install-i3-config-wizard: i3-config-wizard/i3-config-wizard
|
||||
echo "[i3-config-wizard] Install"
|
||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
||||
$(INSTALL) -m 0755 i3-config-wizard/i3-config-wizard $(DESTDIR)$(PREFIX)/bin/
|
||||
|
||||
clean-i3-config-wizard:
|
||||
echo "[i3-config-wizard] Clean"
|
||||
rm -f $(i3_config_wizard_OBJECTS) $(i3_config_wizard_SOURCES_GENERATED) i3-config-wizard/i3-config-wizard i3-config-wizard/cfgparse.{output,dot}
|
Loading…
Reference in New Issue