1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
prefix=@prefix@
etcdir=@sysconfdir@
bindir=${prefix}/bin
sbindir=${prefix}/sbin
libdir=${prefix}/lib
moddir=${libdir}/cdebconf/frontend
sharedir=${prefix}/share/debconf
mandir=${prefix}/share/man
incdir=${prefix}/include/cdebconf
PACKAGE=@PACKAGE@
CC=@CC@
CFLAGS=@CFLAGS@ -I.
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
NEWT_CFLAGS=@NEWT_CFLAGS@
NEWT_LIBS=@NEWT_LIBS@
GTK_CFLAGS=@GTK_CFLAGS@
GTK_LIBS=@GTK_LIBS@
# Removed -Werror to let build for GTK+3 with deprecated functions
CFLAGS += -funsigned-char -fstrict-aliasing -Wall -W -Wundef \
-Wwrite-strings -Wsign-compare -Wno-unused-parameter -Winit-self \
-Wpointer-arith -Wredundant-decls -Wno-format-zero-length \
-Wmissing-prototypes -Wmissing-format-attribute
FRONTENDS=@FRONTENDS@
PLUGIN_MODULES=$(addsuffix -plugin-$(PACKAGE).so,$(FRONTENDS))
all: $(PLUGIN_MODULES)
install: $(PLUGIN_MODULES)
for p in $(PLUGIN_MODULES); do \
install -m755 -d $(DESTDIR)/$(moddir)/$${p%%-*} ; \
install -m644 $$p $(DESTDIR)/$(moddir)/$${p%%-*}/$${p#*-} ; \
done
newt-plugin-$(PACKAGE).so: newt-plugin-$(PACKAGE).opic
$(CC) $(LDFLAGS) -shared -o $@ newt-plugin-$(PACKAGE).opic $(NEWT_LIBS)
gtk-plugin-$(PACKAGE).so: gtk-plugin-$(PACKAGE).opic
$(CC) $(LDFLAGS) -shared -o $@ $^ $(GTK_LIBS)
clean:
rm -f $(PLUGIN_MODULES)
rm -f *.opic
distclean: clean
rm -f config.log config.status
rm -f Makefile
gtk-%.opic: gtk-%.c
@echo "Compiling $< to $@"
$(CC) $(CPPFLAGS) $(CFLAGS) $(GTK_CFLAGS) -fPIC -o $@ -c $<
%.opic: %.c
@echo "Compiling $< to $@"
$(CC) $(CPPFLAGS) $(CFLAGS) $(NEWT_CFLAGS) -fPIC -o $@ -c $<
|