forked from C4ptFuture/cdtv-cdtvtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (19 loc) · 819 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PROJECT=cdtvtools
VBCC=/opt/vbcc
VC=$(VBCC)/bin/vc
NDK=$(VBCC)/targets/m68k-amigaos/ndk_3.9
NDK_INC=$(NDK)/include/include_h
NDK_LIB=$(NDK)/linker_libs
SRC=src/$(PROJECT)
DATESTRING := $(shell date +'%-d.%-m.%y')
VERSION = $(shell grep VERSION VERSION|cut -d= -f2)
REVISION = $(shell grep REVISION VERSION|cut -d= -f2)
cdtvtools: createrev
$(VC) +kick13 -I$(NDK_INC) -L$(NDK_LIB) -o build/$(PROJECT)/cdtvtools src/$(PROJECT)/cdtvtools.c -lamiga
# creates the version string include according to Commodore standard
createrev:
echo "VSTRING MACRO" > $(SRC)/rev.i
echo " dc.b $(PROJECT) $(VERSION).$(REVISION) ($(DATESTRING))',13,10,0" >> $(SRC)/rev.i
echo " CNOP 0,2" >> $(SRC)/rev.i
echo " ENDM" >> $(SRC)/rev.i
echo "#define VSTRING \"$(PROJECT) $(VERSION).$(REVISION) ($(DATESTRING))\"" > $(SRC)/rev.h