]> Pileus Git - wmpus/blobdiff - makefile
Add desktop files
[wmpus] / makefile
index fb14b4d31a614e8d32e1eb60f934ff2a3726c532..caceac9e8de918f6ef00c6b0088efea6ea209d8f 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,11 +1,9 @@
 # wmpus - cross platofrm window manager
 # See LICENSE file for copyright and license details.
 
-undefine CC
-
 -include config.mk
 
-VERSION   ?= 0.1
+VERSION   ?= 0.1-rc1
 WM        ?= wmii
 SYS       ?= x11
 CFLAGS    ?= -g -Wall
@@ -13,15 +11,14 @@ PREFIX    ?= /usr/local
 MANPREFIX ?= ${PREFIX}/share/man
 
 ifeq ($(SYS),x11)
-CC        ?= gcc
+GCC       ?= gcc
 PROG      ?= wmpus
 LDFLAGS   += -lX11 -lXinerama
 endif
 
 ifeq ($(SYS),win32)
-CC        ?= i686-pc-mingw32-gcc
+GCC       ?= i486-mingw32-gcc
 PROG      ?= wmpus.exe
-CFLAGS    += -D_MODE_T_
 LDFLAGS   += -lgdi32
 endif
 
@@ -35,17 +32,20 @@ dist:
                README LICENSE config.mk.example makefile *.1 *.c *.h
 
 install: all
+       sed -i 's:/usr.*:$(PREFIX)/bin/wmpus:' wmpus.session
        install -m 755 -D $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
        install -m 644 -D wmpus.1 $(DESTDIR)$(MANPREFIX)/man1/wmpus.1
+       install -m 755 -D wmpus.session $(DESTDIR)/etc/X11/Sessions/wmpus
+       install -m 644 -D wmpus.desktop $(DESTDIR)$(PREFIX)/share/xsessions/wmpus.desktop
 
 uninstall:
        rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
        rm -f $(DESTDIR)$(MANPREFIX)/man1/wmpus.1
 
 $(PROG): main.o conf.o util.o sys-$(SYS).o wm-$(WM).o
-       $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
+       $(GCC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
 
 %.o: %.c $(wildcard *.h) makefile
-       $(CC) $(CFLAGS) --std=gnu99 -c -o $@ $<
+       $(GCC) $(CFLAGS) --std=gnu99 -c -o $@ $<
 
 .PHONY: all clean dist install uninstall