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 ######################################
20 INCLUDES += $(X11_INCLUDES)
21 INCLUDES += $(LIBMAINLOOP_INCLUDES) $(LIBTU_INCLUDES) $(LIBEXTL_INCLUDES)
25 LIBS += $(WHOLEA) $(LIBMAINLOOP_LIBS) $(LIBEXTL_LIBS) $(LIBTU_LIBS) $(NO_WHOLEA)
26 LIBS += $(LUA_LIBS) $(DL_LIBS)
29 ifeq ($(PRELOAD_MODULES),1)
30 EXT_OBJS += $(foreach mod, $(PWM_MODULE_LIST), ../$(mod)/$(mod).a)
31 DEPEND_DEPENDS += preload.c
36 LINKOPTS = $(EXPORT_DYNAMIC)
37 WHOLEA = -Wl,-whole-archive
38 NO_WHOLEA = -Wl,-no-whole-archive
41 EXT_OBJS += ../ioncore/ioncore.a
43 DEFINES += -DETCDIR=\"$(ETCDIR)\" -DSHAREDIR=\"$(SHAREDIR)\" \
44 -DEXTRABINDIR=\"$(EXTRABINDIR)\" -DMODULEDIR=\"$(MODULEDIR)\" \
45 -DLCDIR=\"$(LCDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
48 PWM_ETCDIR = $(ETCDIR)
50 DEFINES += -DPWM_ETCDIR=\"$(PWM_ETCDIR)\"
53 CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE)
55 ######################################
57 include $(TOPDIR)/build/rules.mk
59 ######################################
61 pwm3: $(OBJS) $(EXT_OBJS)
62 $(CC) $(LINKOPTS) $(OBJS) $(WHOLEA) $(EXT_OBJS) $(NO_WHOLEA) $(LDFLAGS) -o $@
65 $(LUA) ../build/mkpreload.lua $(PWM_MODULE_LIST) > preload.c
68 $(INSTALLDIR) $(BINDIR)
69 $(INSTALL) -m $(BIN_MODE) pwm3 $(BINDIR)
70 $(INSTALLDIR) $(PWM_ETCDIR)
72 $(INSTALL) -m $(DATA_MODE) $$i $(PWM_ETCDIR); \