++PACKAGE=gwion
++CFLAGS += -DPACKAGE='"{PACKAGE}"'
++
ifeq (,$(wildcard util/config.mk))
$(shell cp util/config.mk.orig util/config.mk)
endif
include util/config.mk
include config.mk
--DEPDIR := .d
--$(shell mkdir -p $(DEPDIR) >/dev/null)
--DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$(@F:.o=.Td)
--
# initialize source lists
src_src := $(wildcard src/*.c)
lib_src := $(wildcard src/lib/*.c)
libgwion.a: ${gwlib_obj}
${AR} ${AR_OPT}
--config.mk:
-- $(info generating config.mk)
-- @cp config.mk.orig config.mk
--
util/libgwion_util.a:
@make -C util
ast/libgwion_ast.a:
@make -C ast
--options:
-- $(info CC : ${CC})
-- $(info CFLAGS : ${CFLAGS})
-- $(info LDFLAGS : ${LDFLAGS})
--
clean:
$(info cleaning ...)
@rm -f */*.o */*/*.o */*.gw.* */*/*.gw.* */*/*.gcda */*/*.gcno gwion
@mv -f $(DEPDIR)/$(@F:.o=.Td) $(DEPDIR)/$(@F:.o=.d) && touch $@
@echo $@: config.mk >> $(DEPDIR)/$(@F:.o=.d)
--.c.o: $(DEPDIR)/%.d
-- $(info compile $(<:.c=))
-- @${CC} $(DEPFLAGS) ${CFLAGS} ${CICFLAGS} -c $< -o $(<:.c=.o)
-- @mv -f $(DEPDIR)/$(@F:.o=.Td) $(DEPDIR)/$(@F:.o=.d) && touch $@
-- @echo $@: config.mk >> $(DEPDIR)/$(@F:.o=.d)
--
install: ${PRG}
install ${PRG} ${PREFIX}/bin
@bash help/test.sh tests/* examples
include $(wildcard .d/*.d)
++include util/target.mk
++include util/intl.mk