5 # System-specific configuration is in system.mk
7 include $(TOPDIR)/build/system-inc.mk
9 # List of modules to possibly preload
10 include $(TOPDIR)/modulelist.mk
12 ######################################
18 INCLUDES += $(X11_INCLUDES)
19 INCLUDES += $(LIBMAINLOOP_INCLUDES) $(LIBTU_INCLUDES) $(LIBEXTL_INCLUDES)
23 LIBS += $(WHOLEA) $(LIBMAINLOOP_LIBS) $(LIBEXTL_LIBS) $(LIBTU_LIBS) $(NO_WHOLEA)
24 LIBS += $(LUA_LIBS) $(DL_LIBS)
27 ifeq ($(PRELOAD_MODULES),1)
28 EXT_OBJS += $(foreach mod, $(MODULE_LIST), ../$(mod)/$(mod).a)
29 DEPEND_DEPENDS += preload.c
34 LINKOPTS = $(EXPORT_DYNAMIC)
35 WHOLEA = -Wl,-whole-archive
36 NO_WHOLEA = -Wl,-no-whole-archive
39 EXT_OBJS += ../ioncore/ioncore.a
41 DEFINES += -DETCDIR=\"$(ETCDIR)\" -DSHAREDIR=\"$(SHAREDIR)\" \
42 -DEXTRABINDIR=\"$(EXTRABINDIR)\" -DMODULEDIR=\"$(MODULEDIR)\" \
43 -DLCDIR=\"$(LCDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
45 CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE)
47 ######################################
49 include $(TOPDIR)/build/rules.mk
51 ######################################
53 ion3: $(OBJS) $(EXT_OBJS)
54 $(CC) $(LINKOPTS) $(OBJS) $(WHOLEA) $(EXT_OBJS) $(NO_WHOLEA) $(LDFLAGS) -o $@
57 $(LUA) ../build/mkpreload.lua $(MODULE_LIST) > preload.c
60 $(INSTALLDIR) $(BINDIR)
61 $(INSTALL) -m $(BIN_MODE) ion3 $(BINDIR)