2 include $(topdir
)/autoconf
/targets.mak
4 common_srcs
:= upsfetch.c cgilib.c
5 multimon_srcs
:= multimon.c
6 tomatoups_srcs
:= tomatoups.c
7 tomatodata_srcs
:= tomatodata.c
8 upsstats_srcs
:= upsstats.c
9 upsfstats_srcs
:= upsfstats.c
10 upsimage_srcs
:= upsimage.c
12 common_obj
:= $(call SRC2OBJ
,$(common_srcs
))
13 multimon_obj
:= $(call SRC2OBJ
,$(multimon_srcs
))
14 tomatoups_obj
:= $(call SRC2OBJ
,$(tomatoups_srcs
))
15 tomatodata_obj
:= $(call SRC2OBJ
,$(tomatodata_srcs
))
16 upsstats_obj
:= $(call SRC2OBJ
,$(upsstats_srcs
))
17 upsfstats_obj
:= $(call SRC2OBJ
,$(upsfstats_srcs
))
18 upsimage_obj
:= $(call SRC2OBJ
,$(upsimage_srcs
))
20 SRCS
= $(common_srcs
) $(multimon_srcs
) $(upsstats_srcs
) \
21 $(upsfstats_srcs
) $(upsimage_srcs
) $(tomatoups_srcs
) $(tomatodata_srcs
)
23 all-targets
: tomatoups.cgi tomatodata.cgi multimon.cgi upsstats.cgi upsfstats.cgi
25 multimon.cgi
: $(common_obj
) $(multimon_obj
) $(APCLIBS
)
28 tomatoups.cgi
: $(common_obj
) $(tomatoups_obj
) $(APCLIBS
)
31 tomatodata.cgi
: $(common_obj
) $(tomatodata_obj
) $(APCLIBS
)
34 upsstats.cgi
: $(common_obj
) $(upsstats_obj
) $(APCLIBS
)
37 upsfstats.cgi
: $(common_obj
) $(upsfstats_obj
) $(APCLIBS
)
40 upsimage.cgi
: $(common_obj
) $(upsimage_obj
) $(APCLIBS
)
41 $(LINK
) $(X_LIBS
) $(LIBGD
)
43 all-install
: install-cgi
44 all-uninstall
: uninstall-cgi
47 $(call MKDIR
,$(cgibin
))
48 $(call INSTPROG
,755,multimon.cgi
,$(cgibin
))
49 $(call INSTPROG
,755,tomatoups.cgi
,$(cgibin
))
50 $(call INSTPROG
,755,tomatodata.cgi
,$(cgibin
))
51 $(call INSTPROG
,755,upsstats.cgi
,$(cgibin
))
52 $(call INSTPROG
,755,upsfstats.cgi
,$(cgibin
))
53 # $(call INSTPROG,755,upsimage.cgi,$(cgibin))
54 $(call MKDIR
,$(sysconfdir
))
55 $(call INSTNEW
,644,apcupsd.css
,$(sysconfdir
))
56 $(call INSTNEW
,644,$(topdir
)/platforms
/etc
/hosts.conf
,$(sysconfdir
))
57 $(call INSTNEW
,644,$(topdir
)/platforms
/etc
/multimon.conf
,$(sysconfdir
))
60 $(call UNINST
,$(cgibin
)/multimon.cgi
)
61 $(call UNINST
,$(cgibin
)/tomatoups.cgi
)
62 $(call UNINST
,$(cgibin
)/tomatodata.cgi
)
63 $(call UNINST
,$(cgibin
)/upsstats.cgi
)
64 $(call UNINST
,$(cgibin
)/upsfstats.cgi
)
65 # $(call UNINST,$(cgibin)/upsimage.cgi)
66 $(call UNINST
,$(sysconfdir
)/apcupsd.css
)
67 $(call UNINST
,$(sysconfdir
)/apcupsd.css.new
)
68 $(call UNINST
,$(sysconfdir
)/hosts.conf
)
69 $(call UNINST
,$(sysconfdir
)/hosts.conf.new
)
70 $(call UNINST
,$(sysconfdir
)/multimon.conf
)
71 $(call UNINST
,$(sysconfdir
)/multimon.conf.new
)
73 # Include dependencies