UPS: apcupsd clean sources
[tomato.git] / release / src / router / apcupsd / src / gapcmon / Makefile
blobc2b9b23d2a0320a606e2cb2d555a9a0c767ba699
1 topdir:=../..
2 include $(topdir)/autoconf/targets.mak
4 SRCS = $(wildcard *.c)
6 # This bit of hackery is because gapcmon has its own CFLAGS and LIBS.
7 # Plus it needs to be built with a C compiler while normally all apcupsd *.c
8 # files are built with a C++ compiler. At some point we'll rename all *.c
9 # files in the rest of the tree to *.cpp and some of this can then go away.
10 CXX = $(CC)
11 CPPFLAGS += $(GAPCMON_CFLAGS) -DICON_DIR=\"$(datadir)\"
12 CXXFLAGS = $(CFLAGS)
13 LIBS := $(GAPCMON_LIBS) $(X_LIBS) -lX11 -lXext $(LIBS)
15 all-targets: gapcmon
17 gapcmon: $(OBJS)
18 $(LINK)
20 all-install: install-gapcmon
21 all-uninstall: uninstall-gapcmon
23 install-gapcmon:
24 $(call MKDIR,$(bindir))
25 $(call MKDIR,$(datadir)/pixmaps)
26 $(call MKDIR,$(datadir)/applications)
27 $(call INSTPROG,755,gapcmon,$(bindir)/gapcmon)
28 $(call INSTDATA,755,gapcmon.desktop,$(datadir)/applications/gapcmon.desktop)
29 $(call INSTDATA,744,apcupsd.png,$(datadir)/pixmaps/apcupsd.png)
30 $(call INSTDATA,744,online.png,$(datadir)/pixmaps/online.png)
31 $(call INSTDATA,744,onbatt.png,$(datadir)/pixmaps/onbatt.png)
32 $(call INSTDATA,744,charging.png,$(datadir)/pixmaps/charging.png)
33 $(call INSTDATA,744,unplugged.png,$(datadir)/pixmaps/unplugged.png)
34 $(call INSTDATA,744,gapc_prefs.png,$(datadir)/pixmaps/gapc_prefs.png)
36 uninstall-gapcmon:
37 $(call UNINST,$(datadir)/pixmaps/apcupsd.png)
38 $(call UNINST,$(datadir)/pixmaps/unplugged.png)
39 $(call UNINST,$(datadir)/pixmaps/online.png)
40 $(call UNINST,$(datadir)/pixmaps/onbatt.png)
41 $(call UNINST,$(datadir)/pixmaps/charging.png)
42 $(call UNINST,$(datadir)/applications/gapc_prefs.png)
43 $(call UNINST,$(datadir)/applications/gapcmon.desktop)
44 $(call UNINST,$(bindir)/gapcmon)
46 # Include dependencies
47 -include $(DEPS)