1 |
+ |
# Makefile for winhost |
2 |
+ |
# $Id$ |
3 |
|
|
4 |
< |
FILES = winhost.exe winhost.ini SysTray.ocx MSWINSCK.OCX PDH.DLL |
3 |
< |
ARCNAME = iscream-winhost |
4 |
< |
ZIPEXT = .zip |
5 |
< |
ZIPFILE = $(ARCNAME)$(ZIPEXT) |
6 |
< |
BUILDDIR = build |
7 |
< |
rev = HEAD |
8 |
< |
REVISION = $(rev) |
9 |
< |
CVS = `if test -x /usr/bin/cvs; then echo /usr/bin/cvs; else if test -x /usr/local/bin/cvs; then echo /usr/local/bin/cvs; else echo cvs; fi fi` |
10 |
< |
CVSROOT = /usr/local/proj/co600_10/cvs |
11 |
< |
CVSBUILDTEMP = cvsbuildtemp |
12 |
< |
CVSMODULE = source/host/winhost |
4 |
> |
include Config.inc |
5 |
|
|
6 |
< |
all: dist |
6 |
> |
.PHONY : all |
7 |
> |
all : dist |
8 |
|
|
9 |
< |
dist: |
17 |
< |
zip -9 $(BUILDDIR)/$(ZIPFILE) $(FILES) |
9 |
> |
### Code Building |
10 |
|
|
11 |
< |
cvsbuild: |
12 |
< |
$(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSMODULE) |
13 |
< |
cd $(CVSBUILDTEMP) && $(MAKE) dist |
14 |
< |
cp $(CVSBUILDTEMP)/$(BUILDDIR)/$(ZIPFILE) $(BUILDDIR)/$(ARCNAME)-$(REVISION)$(ZIPEXT) |
11 |
> |
.PHONY : build |
12 |
> |
build : |
13 |
> |
cp -R $(FILES) $(BUILD) |
14 |
> |
@touch $(MCOMPILECHECK) |
15 |
|
|
16 |
< |
clean: |
25 |
< |
rm -Rf $(BUILDDIR)/$(ZIPFILE) |
26 |
< |
rm -Rf $(BUILDDIR)/$(ARCNAME)-*$(ZIPEXT) |
27 |
< |
rm -Rf $(CVSBUILDTEMP) |
16 |
> |
### Changelog |
17 |
|
|
18 |
< |
update: |
19 |
< |
$(CVS) -q -d $(CVSROOT) update |
18 |
> |
.PHONY : changelog |
19 |
> |
changelog : $(CHANGELOG) |
20 |
|
|
21 |
< |
distclean: clean |
21 |
> |
.PHONY : mkchangelog |
22 |
> |
mkchangelog : |
23 |
> |
if [ -d $(SOURCEROOT)/CVS ]; then \ |
24 |
> |
$(CVS2CL) $(CVS2CLFLAGS) > $(CHANGELOG); \ |
25 |
> |
else \ |
26 |
> |
echo "Can't generate ChangeLog from non-checked out copy." > $(CHANGELOG); \ |
27 |
> |
fi |
28 |
> |
|
29 |
> |
### Dist Making |
30 |
> |
|
31 |
> |
.PHONY : dist |
32 |
> |
dist : |
33 |
> |
cd $(BUILD) && $(MAKE) dist dest=$(DISTDEST) |
34 |
> |
|
35 |
> |
### Code Cleaning |
36 |
> |
|
37 |
> |
.PHONY : clean |
38 |
> |
clean : |
39 |
> |
cd $(BUILD) && $(MAKE) clean ver=$(VERSION) |
40 |
> |
rm -f $(MCOMPILECHECK) |
41 |
> |
|
42 |
> |
.PHONY : distclean |
43 |
> |
distclean : clean |
44 |
> |
cd $(BUILD) && rm -f $(CLPATH) |
45 |
> |
rm -f Config.inc |
46 |
> |
|
47 |
> |
### Install |
48 |
> |
|
49 |
> |
.PHONY : install |
50 |
> |
install : $(MCOMPILECHECK) $(CHANGELOG) |
51 |
> |
@echo "-------------------------------------------------------" |
52 |
> |
@echo "Installing to $(INSTALLPREFIX)" |
53 |
> |
@echo " copying files to $(INSTALLPREFIX)" |
54 |
> |
@mkdir -p $(INSTALLPREFIX) |
55 |
> |
@cp -R $(FILES) $(INSTALLPREFIX) |
56 |
> |
@echo " copying text information files to $(INSTALLPREFIX)" |
57 |
> |
@cp COPYING.txt $(CHANGELOG) $(INSTALLPREFIX) |
58 |
> |
@echo "Completed install to $(INSTALLPREFIX)" |
59 |
> |
@echo "-------------------------------------------------------" |
60 |
> |
|
61 |
> |
### Global Include |
62 |
> |
|
63 |
> |
include $(MKINC) |