2 include $(topdir
)/autoconf
/targets.mak
4 common_srcs
:= upsfetch.c cgilib.c
5 multimon_srcs
:= multimon.c
6 upsstats_srcs
:= upsstats.c
7 upsfstats_srcs
:= upsfstats.c
8 upsimage_srcs
:= upsimage.c
10 common_obj
:= $(call SRC2OBJ
,$(common_srcs
))
11 multimon_obj
:= $(call SRC2OBJ
,$(multimon_srcs
))
12 upsstats_obj
:= $(call SRC2OBJ
,$(upsstats_srcs
))
13 upsfstats_obj
:= $(call SRC2OBJ
,$(upsfstats_srcs
))
14 upsimage_obj
:= $(call SRC2OBJ
,$(upsimage_srcs
))
16 SRCS
= $(common_srcs
) $(multimon_srcs
) $(upsstats_srcs
) \
17 $(upsfstats_srcs
) $(upsimage_srcs
)
19 all-targets
: multimon.cgi upsstats.cgi upsfstats.cgi upsimage.cgi
21 multimon.cgi
: $(common_obj
) $(multimon_obj
) $(APCLIBS
)
24 upsstats.cgi
: $(common_obj
) $(upsstats_obj
) $(APCLIBS
)
27 upsfstats.cgi
: $(common_obj
) $(upsfstats_obj
) $(APCLIBS
)
30 upsimage.cgi
: $(common_obj
) $(upsimage_obj
) $(APCLIBS
)
31 $(LINK
) $(X_LIBS
) $(LIBGD
)
33 all-install
: install-cgi
34 all-uninstall
: uninstall-cgi
37 $(call MKDIR
,$(cgibin
))
38 $(call INSTPROG
,755,multimon.cgi
,$(cgibin
))
39 $(call INSTPROG
,755,upsstats.cgi
,$(cgibin
))
40 $(call INSTPROG
,755,upsfstats.cgi
,$(cgibin
))
41 $(call INSTPROG
,755,upsimage.cgi
,$(cgibin
))
42 $(call MKDIR
,$(sysconfdir
))
43 $(call INSTNEW
,644,apcupsd.css
,$(sysconfdir
))
44 $(call INSTNEW
,644,$(topdir
)/platforms
/etc
/hosts.conf
,$(sysconfdir
))
45 $(call INSTNEW
,644,$(topdir
)/platforms
/etc
/multimon.conf
,$(sysconfdir
))
48 $(call UNINST
,$(cgibin
)/multimon.cgi
)
49 $(call UNINST
,$(cgibin
)/upsstats.cgi
)
50 $(call UNINST
,$(cgibin
)/upsfstats.cgi
)
51 $(call UNINST
,$(cgibin
)/upsimage.cgi
)
52 $(call UNINST
,$(sysconfdir
)/apcupsd.css
)
53 $(call UNINST
,$(sysconfdir
)/apcupsd.css.new
)
54 $(call UNINST
,$(sysconfdir
)/hosts.conf
)
55 $(call UNINST
,$(sysconfdir
)/hosts.conf.new
)
56 $(call UNINST
,$(sysconfdir
)/multimon.conf
)
57 $(call UNINST
,$(sysconfdir
)/multimon.conf.new
)
59 # Include dependencies