dockapps/wmacpi/Makefile
Doug Torrance a68f78f034 wmacpi: Bump to wmacpi-ng version 0.50.
Source obtained from http://sourceforge.net/projects/wmacpi/files/.

2003 July 6 0.50
	Finally got rid of that annoying button - that space now contains
	a 'B 1' or 'B 2' (only those two at present, since I'm too lazy to
	fix it so that the number is generic. It should work fine for
	anyone who doesn't have a freakish system with more than two
	batteries . . .)

	A few more code cleanups.
2014-08-19 18:13:56 +01:00

50 lines
1.1 KiB
Makefile

# set options. pick one, acpi or apm. comment out the other one. don't
# uncomment both, bad things will happen :)
OPT := -O2
# uncomment this to make wmacpi use less system colors (looks uglier too)
#OPT += -DLOW_COLOR
# debugging options (don't bother with these)
#OPT = -pg -g -DPRO -DACPI
CC := gcc
CFLAGS := $(OPT) -Wall -W -g -ansi -I/usr/X11R6/include
LDFLAGS := $(OPT) -L/usr/X11R6/lib -lX11 -lXpm -lXext
WMSRC := wmacpi-ng.c libacpi.c
CLSRC := acpi-ng.c libacpi.c
HEADERS := libacpi.h wmacpi-ng.h
targets := wmacpi-ng acpi-ng
all: $(targets)
# build the list of object files
WMOBJ := $(patsubst %.c,%.o,$(filter %.c,$(WMSRC)))
CLOBJ := $(patsubst %.c,%.o,$(filter %.c,$(CLSRC)))
# include per-file dependencies
include $(WMOBJ:.o=.d)
include $(CLOBJ:.o=.d)
wmacpi-ng: $(WMOBJ)
gcc $(LDFLAGS) -o $@ $^
acpi-ng: $(CLOBJ)
gcc $(LDFLAGS) -o $@ $^
# build per-file dependencies - note that -MM may not be supported
# in gcc versions older than 2.95.4, but most likely is.
%.d: %.c
gcc -MM $(CFLAGS) $< > $@
clean:
rm -f TAGS *.o *~ trace *.out *.bb *.bbg
clean-all: clean
rm -f *.d $(targets)
tags:
etags $(WMSRC) $(CLSRC) $(HEADERS)