root/pcbsdTCR/Makefile

Revision 10, 4.0 KB (checked in by andrei, 2 years ago)

First ThinClientRelease? source files import

Line 
1#
2# Copyright (c) 2005 Dario Freni
3#
4# See COPYING for licence terms.
5#
6# $FreeBSD$
7# $Id: Makefile,v 1.5 2006/05/29 19:26:42 saturnero Exp $
8#
9# FreeSBIE makefile. Main targets are:
10#
11# iso:          build an iso image
12# img:          build a loopback image
13# flash:        copy the built system on a device (interactive)
14# freesbie:     same of `iso'
15#
16# pkgselect:    choose packages to include in the built system (interactive)
17
18.if defined(MAKEOBJDIRPREFIX)
19CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
20.else
21CANONICALOBJDIR:=/usr/obj${.CURDIR}
22.endif
23
24all: freesbie
25
26freesbie: iso
27
28pkgselect: obj
29        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} pkgselect
30
31obj: .done_objdir
32.done_objdir:
33        @if ! test -d ${CANONICALOBJDIR}/; then \
34                mkdir -p ${CANONICALOBJDIR}; \
35                if ! test -d ${CANONICALOBJDIR}/; then \
36                        ${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
37                        exit 1; \
38                fi; \
39        fi
40        @if ! test -f .done_objdir; then \
41                touch ${CANONICALOBJDIR}/.done_objdir; \
42        fi
43
44buildworld: .done_buildworld
45.done_buildworld: .done_objdir
46        @-rm -f ${CANONICALOBJDIR}/.tmp_buildworld
47        @touch ${CANONICALOBJDIR}/.tmp_buildworld
48        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} buildworld ${CANONICALOBJDIR}/.tmp_buildworld
49        @mv ${CANONICALOBJDIR}/.tmp_buildworld ${CANONICALOBJDIR}/.done_buildworld
50
51installworld: .done_installworld
52.done_installworld: .done_buildworld
53        @-rm -f ${CANONICALOBJDIR}/.tmp_installworld
54        @touch ${CANONICALOBJDIR}/.tmp_installworld
55        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} installworld ${CANONICALOBJDIR}/.tmp_installworld
56        @mv ${CANONICALOBJDIR}/.tmp_installworld ${CANONICALOBJDIR}/.done_installworld
57
58buildkernel: .done_buildkernel
59.done_buildkernel: .done_buildworld
60        @-rm -f ${CANONICALOBJDIR}/.tmp_buildkernel
61        @touch ${CANONICALOBJDIR}/.tmp_buildkernel
62        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} buildkernel ${CANONICALOBJDIR}/.tmp_buildkernel
63        @mv ${CANONICALOBJDIR}/.tmp_buildkernel ${CANONICALOBJDIR}/.done_buildkernel
64
65installkernel: .done_installkernel
66.done_installkernel: .done_buildkernel .done_installworld
67        @-rm -f ${CANONICALOBJDIR}/.tmp_installkernel
68        @touch ${CANONICALOBJDIR}/.tmp_installkernel
69        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} installkernel ${CANONICALOBJDIR}/.tmp_installkernel
70        @mv ${CANONICALOBJDIR}/.tmp_installkernel ${CANONICALOBJDIR}/.done_installkernel
71
72pkginstall: .done_pkginstall
73.done_pkginstall: .done_installworld
74        @-rm -f ${CANONICALOBJDIR}/.tmp_pkginstall
75        @touch ${CANONICALOBJDIR}/.tmp_pkginstall
76        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} pkginstall ${CANONICALOBJDIR}/.tmp_pkginstall
77        @mv ${CANONICALOBJDIR}/.tmp_pkginstall ${CANONICALOBJDIR}/.done_pkginstall
78
79extra:  .done_extra
80.done_extra: .done_installworld
81        @-rm -f ${CANONICALOBJDIR}/.tmp_extra
82        @touch ${CANONICALOBJDIR}/.tmp_extra
83        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} extra ${CANONICALOBJDIR}/.tmp_extra
84        @mv ${CANONICALOBJDIR}/.tmp_extra ${CANONICALOBJDIR}/.done_extra
85
86clonefs: .done_clonefs
87.done_clonefs: .done_installkernel .done_pkginstall .done_extra
88        @-rm -f ${CANONICALOBJDIR}/.tmp_clonefs
89        @touch ${CANONICALOBJDIR}/.tmp_clonefs
90        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} clonefs ${CANONICALOBJDIR}/.tmp_clonefs
91        @mv ${CANONICALOBJDIR}/.tmp_clonefs ${CANONICALOBJDIR}/.done_clonefs
92
93iso: .done_iso
94.done_iso: .done_clonefs
95        @-rm -f ${CANONICALOBJDIR}/.tmp_iso
96        @touch ${CANONICALOBJDIR}/.tmp_iso
97        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} iso ${CANONICALOBJDIR}/.tmp_iso
98        @mv ${CANONICALOBJDIR}/.tmp_iso ${CANONICALOBJDIR}/.done_iso
99
100img: .done_img
101.done_img: .done_clonefs
102        @-rm -f ${CANONICALOBJDIR}/.tmp_img
103        @touch ${CANONICALOBJDIR}/.tmp_img
104        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} img ${CANONICALOBJDIR}/.tmp_img
105        @mv ${CANONICALOBJDIR}/.tmp_img ${CANONICALOBJDIR}/.done_img
106
107flash: .done_flash
108.done_flash: .done_clonefs
109        @-rm -f ${CANONICALOBJDIR}/.tmp_flash
110        @touch ${CANONICALOBJDIR}/.tmp_flash
111        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} flash ${CANONICALOBJDIR}/.tmp_flash
112        @mv ${CANONICALOBJDIR}/.tmp_flash ${CANONICALOBJDIR}/.done_flash
113
114clean:
115        @-rm -f .tmp* .done* > /dev/null 2>&1
116
117cleandir: clean
118        @sh ${.CURDIR}/scripts/launch.sh ${.CURDIR} cleandir
Note: See TracBrowser for help on using the browser.