summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 16 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 55b6c97..3d5d02d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,9 @@ LOADLIBES := -lxml2
COMMON := qarsh_packet.c sockutil.c
-all: qarshd qarsh qacp btimed btimec
+TARGETS := qarshd qarsh qacp btimed btimec
+
+all: $(TARGETS)
qarshd: qarshd.c $(COMMON)
qarsh: qarsh.c $(COMMON)
@@ -14,31 +16,18 @@ qacp: qacp.c $(COMMON)
btimed: btimed.c
btimec: btimec.c btime.c
-install: qarsh qarshd
- @echo Installing qarsh daemon and client
- install -d ${STSDIR}/bin/
- install qacp ${STSDIR}/bin
- install qarsh ${STSDIR}/bin
- install qarshd ${STSDIR}/bin
-
- @echo "Installing btime deamon and test client"
- @install -d ${STSDIR}/bin/
- @install btimed ${STSDIR}/bin
- @install btimec ${STSDIR}/bin
-
-uninstall:
- ${UNINSTALL} qacp ${STSDIR}/bin
- ${UNINSTALL} qarsh ${STSDIR}/bin
- ${UNINSTALL} qarshd ${STSDIR}/bin
- ${UNINSTALL} btimed ${STSDIR}/bin
- ${UNINSTALL} btimec ${STSDIR}/bin
+install: all
+ install -D qacp $(INSTROOT)/usr/bin/qacp
+ install -D qarsh $(INSTROOT)/usr/bin/qarsh
+ install -D qarshd $(INSTROOT)/usr/sbin/qarshd
+ install -D btimed $(INSTROOT)/usr/sbin/btimed
+ install -D btimec $(INSTROOT)/usr/bin/btimec
clean:
- /bin/rm -f *.o
-
-clobber:
- /bin/rm -f qacp
- /bin/rm -f qarsh
- /bin/rm -f qarshd
- /bin/rm -f btimec
- /bin/rm -f btimed
+ $(RM) $(TARGETS)
+
+qarsh.tar.bz2: qarsh.spec
+ tar cjf $@ .
+
+rpm: qarsh.tar.bz2 qarsh.spec
+ rpmbuild -ta $<