1 | VALIDATE_DRV ?= 0
|
---|
2 |
|
---|
3 | LD ?= ld
|
---|
4 | AS ?= as
|
---|
5 |
|
---|
6 | PROG= new_haiku_gpt_mbr
|
---|
7 | SRCS= ${PROG}.S
|
---|
8 |
|
---|
9 | ORG= 0x600
|
---|
10 |
|
---|
11 | LDFLAGS=-N -e start -Ttext ${ORG} -S --oformat binary
|
---|
12 |
|
---|
13 | SUFFIX=
|
---|
14 | AS_SYM_VLD=
|
---|
15 | AS_SFX_VLD = _validate
|
---|
16 |
|
---|
17 |
|
---|
18 | ifeq (1,${VALIDATE_DRV})
|
---|
19 | AS_SYM_VLD = --defsym VALIDATE_DRV=${VALIDATE_DRV}
|
---|
20 | SUFFIX=${strip $(AS_SFX_VLD)}
|
---|
21 | endif
|
---|
22 |
|
---|
23 |
|
---|
24 | all: ${PROG}
|
---|
25 |
|
---|
26 | ${PROG}.o: ${PROG}.S
|
---|
27 | ${AS} ${AS_SYM_VLD} -o ${PROG}.o ${SRCS}
|
---|
28 |
|
---|
29 |
|
---|
30 | ${PROG}: ${PROG}.o
|
---|
31 | ${LD} ${LDFLAGS} -o ${PROG}${SUFFIX} ${PROG}.o
|
---|
32 |
|
---|
33 |
|
---|
34 | clean:
|
---|
35 | rm ${PROG} ${PROG}${strip $(AS_SFX_VLD)} ${PROG}.o
|
---|