URI:
       tMakefile - spoon - [fork] customized build of spoon, the dwm status utility
  HTML git clone git://src.adamsgaard.dk/spoon
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
       tMakefile (1743B)
       ---
            1 VERSION = 0.6
            2 PREFIX = /usr/local
            3 SRC = spoon.c batt.c wifi.c cpu.c count.c temp.c date.c load.c file.c key.c\
            4       netspeed.c strlcpy.c strlcat.c stub.c mix.c xkblayout.c mpd.c\
            5           brightness.c fileexists.c
            6 OBJ = spoon.o batt.o wifi.o cpu.o count.o temp.o date.o load.o file.o key.o\
            7       netspeed.o strlcpy.o strlcat.o stub.o brightness.o fileexists.o
            8 BIN = spoon
            9 DISTFILES = $(SRC) arg.h types.h util.h config.def.h Makefile LICENSE configure
           10 
           11 include config.mk
           12 
           13 CPPFLAGS_OpenBSD = -I/usr/X11R6/include -I/usr/local/include
           14 LDFLAGS_OpenBSD = -L/usr/X11R6/lib -L/usr/local/lib
           15 CPPFLAGS_Linux = -I/usr/local/include
           16 CPPFLAGS = $(CPPFLAGS_$(UNAME))
           17 LDFLAGS = $(LDFLAGS_$(UNAME))
           18 LDLIBS = -lX11
           19 
           20 
           21 # To remove extra compile time dependencies for unwanted plugins
           22 # comment out the following sections.  The stub implementations
           23 # from stub.c will be used instead.
           24 OBJ += mix.o
           25 LDLIBS_OpenBSD_mix = -lsndio
           26 # if ALSA
           27 LDLIBS_Linux_mix = -lasound
           28 CPPFLAGS += -DUSE_TINYALSA=0
           29 # else TinyALSA
           30 #LDLIBS_Linux_mix = -ltinyalsa
           31 #CPPFLAGS += -DUSE_TINYALSA=1
           32 LDLIBS += $(LDLIBS_$(UNAME)_mix)
           33 
           34 OBJ += xkblayout.o
           35 LDLIBS += -lxkbfile
           36 
           37 OBJ += mpd.o
           38 LDLIBS += -lmpdclient
           39 
           40 all: $(BIN)
           41 
           42 spoon.o: config.h
           43 
           44 config.h:
           45         cp config.def.h $@
           46 
           47 clean:
           48         rm -f $(OBJ) $(BIN) $(BIN)-$(VERSION).tar.gz
           49 
           50 install: all
           51         mkdir -p $(DESTDIR)$(PREFIX)/bin
           52         cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
           53 
           54 uninstall:
           55         rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
           56 
           57 dist:
           58         mkdir -p $(BIN)-$(VERSION)
           59         cp $(DISTFILES) $(BIN)-$(VERSION)
           60         tar -cf $(BIN)-$(VERSION).tar $(BIN)-$(VERSION)
           61         gzip $(BIN)-$(VERSION).tar
           62         rm -rf $(BIN)-$(VERSION)
           63 
           64 .PHONY: all clean install uninstall dist
           65 
           66 .SUFFIXES: .c .o
           67 
           68 .c.o:
           69         $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
           70 
           71 $(BIN): $(OBJ)
           72         $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS)