wmmenu: Update Makefile.
In particular, - Remove option to compile with deprecated GDK-PixBuf 1.0. - Remove *ROOT variables; libdockapp should be in the default include search path and X11R6 directories are deprecated. - Remove /opt/gtk2/bin from PIXBUF_CFG; pkg-config is likely elsewhere. - Remove CPPFLAGS from CFLAGS and INCDIRS and DEFINES from CFLAGS; we don't want these to disappear if user defines different flags. Inspired in part by similar patches in Gentoo [1] and by Nerijus Baliunas [2]. [1] http://mirrors.telepoint.bg/gentoo-portage/x11-plugins/wmmenu/files/wmmenu-1.2-Makefile.patch [2] http://lists.windowmaker.org/dev/msg07994.html
This commit is contained in:
		
							parent
							
								
									ef546fc369
								
							
						
					
					
						commit
						3f77d709f9
					
				
					 1 changed files with 8 additions and 19 deletions
				
			
		| 
						 | 
					@ -3,35 +3,24 @@ BINDIR = $(prefix)/bin
 | 
				
			||||||
MANDIR = $(prefix)/man
 | 
					MANDIR = $(prefix)/man
 | 
				
			||||||
ETCDIR = $(prefix)/etc
 | 
					ETCDIR = $(prefix)/etc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# comment out both lines to get the old, Xpm-only, version
 | 
					# comment to get the old, Xpm-only, version
 | 
				
			||||||
GDKPIXBUF = 1
 | 
					GDKPIXBUF2 = 1
 | 
				
			||||||
#GDKPIXBUF2 = 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
XROOT = /usr/X11R6
 | 
					 | 
				
			||||||
DAROOT = /usr/local
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# If you want to use gdk-pixbuf, pass GDKPIXBUF=1 to make command
 | 
					 | 
				
			||||||
ifdef GDKPIXBUF
 | 
					 | 
				
			||||||
PIXBUF_DEF = -DWITH_GDKPIXBUF
 | 
					 | 
				
			||||||
PIXBUF_INC := $(shell gdk-pixbuf-config --cflags)
 | 
					 | 
				
			||||||
PIXBUF_LIB := -rdynamic -L$(shell gdk-pixbuf-config --prefix)/lib -lgdk_pixbuf_xlib
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# If you want to use gdk-pixbuf-2.0, pass GDKPIXBUF2=1 to make command
 | 
					# If you want to use gdk-pixbuf-2.0, pass GDKPIXBUF2=1 to make command
 | 
				
			||||||
ifdef GDKPIXBUF2
 | 
					ifdef GDKPIXBUF2
 | 
				
			||||||
PIXBUF_CFG = /opt/gtk2/bin/pkg-config gdk-pixbuf-xlib-2.0
 | 
					PIXBUF_CFG = pkg-config gdk-pixbuf-xlib-2.0
 | 
				
			||||||
PIXBUF_DEF = -DWITH_GDKPIXBUF
 | 
					PIXBUF_DEF = -DWITH_GDKPIXBUF
 | 
				
			||||||
PIXBUF_INC := $(shell $(PIXBUF_CFG) --cflags)
 | 
					PIXBUF_INC := $(shell $(PIXBUF_CFG) --cflags)
 | 
				
			||||||
PIXBUF_LIB := -rdynamic -L$(shell $(PIXBUF_CFG) --variable=prefix)/lib -lgdk_pixbuf_xlib-2.0
 | 
					PIXBUF_LIB := -rdynamic -L$(shell $(PIXBUF_CFG) --variable=prefix)/lib -lgdk_pixbuf_xlib-2.0
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CC = gcc #-g
 | 
					CC = gcc #-g
 | 
				
			||||||
CFLAGS = -pipe $(CPPFLAGS) -O2
 | 
					CFLAGS = -pipe -O2
 | 
				
			||||||
CPPFLAGS = -MMD -ansi -pedantic -Wall $(INCDIRS) $(DEFINES)
 | 
					CPPFLAGS = -MMD -ansi -pedantic -Wall
 | 
				
			||||||
INCDIRS = -I$(DAROOT)/include -I$(XROOT)/include $(PIXBUF_INC)
 | 
					INCDIRS = $(PIXBUF_INC)
 | 
				
			||||||
DEFINES = -DETCDIR='"$(ETCDIR)"' $(PIXBUF_DEF)
 | 
					DEFINES = -DETCDIR='"$(ETCDIR)"' $(PIXBUF_DEF)
 | 
				
			||||||
LDFLAGS = -s
 | 
					LDFLAGS = -s
 | 
				
			||||||
LIBDIRS = -L$(DAROOT)/lib -L$(XROOT)/lib $(PIXBUF_LIB)
 | 
					LIBDIRS = $(PIXBUF_LIB)
 | 
				
			||||||
LDLIBS = -ldockapp -lXpm -lXext -lX11 -lm
 | 
					LDLIBS = -ldockapp -lXpm -lXext -lX11 -lm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MKDIRHIER = mkdir -p
 | 
					MKDIRHIER = mkdir -p
 | 
				
			||||||
| 
						 | 
					@ -52,7 +41,7 @@ INSTMAN = install -c
 | 
				
			||||||
all : $(PRGS)
 | 
					all : $(PRGS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.c.o :
 | 
					.c.o :
 | 
				
			||||||
	$(CC) $(CFLAGS) -c $<
 | 
						$(CC) $(INCDIRS) $(DEFINES) $(CPPFLAGS) $(CFLAGS) -c $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wmmenu : $(OBJS1)
 | 
					wmmenu : $(OBJS1)
 | 
				
			||||||
	$(CC) $(LDFLAGS) -o $@ $(OBJS1) $(LIBDIRS) $(LDLIBS)
 | 
						$(CC) $(LDFLAGS) -o $@ $(OBJS1) $(LIBDIRS) $(LDLIBS)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue