wmi

git clone git://oldgit.suckless.org/wmi/
Log | Files | Refs | LICENSE

Makefile (3065B)


      1 # wmi - window manager improved
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 SRC_wmi = action.cpp \
      7 	actions.cpp \
      8 	atoms.cpp \
      9 	bar.cpp \
     10 	binder.cpp \
     11 	box.cpp \
     12 	clientbar.cpp \
     13 	client.cpp \
     14 	cursors.cpp \
     15 	draw.cpp \
     16 	expander.cpp \
     17 	float.cpp \
     18 	font.cpp \
     19 	frame.cpp \
     20 	inputbar.cpp \
     21 	kernel.cpp \
     22 	label.cpp \
     23 	launcher.cpp \
     24 	loader.cpp \
     25 	logger.cpp \
     26 	main.cpp \
     27 	menu.cpp \
     28 	monitor.cpp \
     29 	prompt.cpp \
     30 	rectangle.cpp \
     31 	shortcut.cpp \
     32 	slot.cpp \
     33 	split.cpp \
     34 	statusbar.cpp \
     35 	theme.cpp \
     36 	thing.cpp \
     37 	tree.cpp \
     38 	util.cpp \
     39 	validators.cpp \
     40 	widget.cpp \
     41 	workspace.cpp \
     42 	xcore.cpp \
     43 	xfont.cpp \
     44 	xftfont.cpp
     45 
     46 SRC_wmiremote = wmiremote.cpp
     47 
     48 OBJ_wmi = ${SRC_wmi:.cpp=.o}
     49 OBJ_wmiremote = ${SRC_wmiremote:.cpp=.o}
     50 
     51 all: options wmi wmiremote
     52 
     53 options:
     54 	@echo wmi build options:
     55 	@echo "CXXFLAGS = ${CXXFLAGS}"
     56 	@echo "LDFLAGS  = ${LDFLAGS}"
     57 	@echo "CXX      = ${CXX}"
     58 
     59 .cpp.o:
     60 	@echo CXX $<
     61 	@${CXX} -c ${CXXFLAGS} $<
     62 
     63 ${OBJ_wmi}: config.mk
     64 
     65 ${OBJ_wmiremote}: config.mk
     66 
     67 wmi: ${OBJ_wmi}
     68 	@echo CXX -o $@
     69 	@${CXX} -o $@ ${OBJ_wmi} ${LDFLAGS}
     70 
     71 wmiremote: ${OBJ_wmiremote}
     72 	@echo CC -o $@
     73 	@${CXX} -o $@ ${OBJ_wmiremote} ${LDFLAGS}
     74 
     75 clean:
     76 	@echo cleaning
     77 	@rm -f wmi wmiremote ${OBJ_wmi} ${OBJ_wmiremote} wmi-${WMI_VERSION}.tar.gz
     78 
     79 dist: clean
     80 	@echo creating dist tarball
     81 	@mkdir -p wmi-${WMI_VERSION}
     82 	@cp -R AUTHORS CONTRIB ChangeLog FAQ INSTALL LICENSE Makefile \
     83 		config.mk examples man *.cpp *.h wmi-${WMI_VERSION}
     84 	@tar -cf wmi-${WMI_VERSION}.tar wmi-${WMI_VERSION}
     85 	@gzip wmi-${WMI_VERSION}.tar
     86 	@rm -rf wmi-${WMI_VERSION}
     87 
     88 install: all
     89 	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
     90 	@mkdir -p ${DESTDIR}${PREFIX}/bin
     91 	@cp -f wmi ${DESTDIR}${PREFIX}/bin
     92 	@chmod 755 ${DESTDIR}${PREFIX}/bin/wmi
     93 	@cp -f wmiremote ${DESTDIR}${PREFIX}/bin
     94 	@chmod 755 ${DESTDIR}${PREFIX}/bin/wmiremote
     95 	@echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1
     96 	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
     97 	@cp -f man/*.1 ${DESTDIR}${MANPREFIX}/man1
     98 	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/wmi.1
     99 	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/wmiremote.1
    100 	@echo installing manual pages to ${DESTDIR}${MANPREFIX}/man5
    101 	@mkdir -p ${DESTDIR}${MANPREFIX}/man5
    102 	@cp -f man/*.5 ${DESTDIR}${MANPREFIX}/man5
    103 	@chmod 644 ${DESTDIR}${MANPREFIX}/man5/actions.conf.5
    104 	@chmod 644 ${DESTDIR}${MANPREFIX}/man5/common.conf.5
    105 	@chmod 644 ${DESTDIR}${MANPREFIX}/man5/session.conf.5
    106 	@chmod 644 ${DESTDIR}${MANPREFIX}/man5/theme.conf.5
    107 
    108 uninstall:
    109 	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
    110 	@rm -f ${DESTDIR}${PREFIX}/bin/wmi
    111 	@rm -f ${DESTDIR}${PREFIX}/bin/wmiremote
    112 	@echo removing manual pages from ${DESTDIR}${MANPREFIX}/man1
    113 	@rm -f ${DESTDIR}${MANPREFIX}/man1/wmi.1
    114 	@rm -f ${DESTDIR}${MANPREFIX}/man1/wmi.1
    115 	@echo removing manual pages from ${DESTDIR}${MANPREFIX}/man1
    116 	@rm -f ${DESTDIR}${MANPREFIX}/man5/actions.conf.5
    117 	@rm -f ${DESTDIR}${MANPREFIX}/man5/common.conf.5
    118 	@rm -f ${DESTDIR}${MANPREFIX}/man5/session.conf.5
    119 	@rm -f ${DESTDIR}${MANPREFIX}/man5/theme.conf.5
    120 
    121 .PHONY: all options clean dist install uninstall