2012-05-16 16:22:57 +02:00
|
|
|
ALL_TARGETS += i3-config-wizard/i3-config-wizard
|
|
|
|
INSTALL_TARGETS += install-i3-config-wizard
|
|
|
|
CLEAN_TARGETS += clean-i3-config-wizard
|
|
|
|
|
2012-07-22 22:04:14 +02:00
|
|
|
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)
|
2012-07-23 00:10:42 +02:00
|
|
|
i3_config_wizard_CFLAGS = $(XCB_CFLAGS) $(XCB_KBD_CFLAGS) $(X11_CFLAGS)
|
|
|
|
i3_config_wizard_LIBS = $(XCB_LIBS) $(XCB_KBD_LIBS) $(X11_LIBS)
|
2012-05-16 16:22:57 +02:00
|
|
|
|
|
|
|
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 $<"
|
2012-07-22 22:27:45 +02:00
|
|
|
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_config_wizard_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
2012-05-16 16:22:57 +02:00
|
|
|
|
|
|
|
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"
|
2012-07-22 22:27:45 +02:00
|
|
|
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(i3_config_wizard_LIBS) $(LIBS)
|
2012-05-16 16:22:57 +02:00
|
|
|
|
|
|
|
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}
|