-
Notifications
You must be signed in to change notification settings - Fork 1
/
BSDmakefile
69 lines (54 loc) · 1.51 KB
/
BSDmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# BSD make file for sftardcal - BSD make will use this one
# Copyright 2015 by S.F.T. Inc. - all rights reserved
# For licensing information, see 'sftardcal.c'
# usage: make TESTER=1 builds tester version
# make POWERSUPPLY=1 builds power supply version
# make clean cleans
CC?=cc
DEBUG ?= 0
POWERSUPPLY ?= 0
TESTER ?= 0
DUALSERIAL ?= 0
#CFLAGS ?=
DEVICE_SPECIFIC_OBJ =
MY_TARGET=sftardcal
THE_CURRENT_TIME!=date -u '+%C%y%m%d%H%M%S'
STANDARD_DEFINES:= $(CFLAGS) -DBUILD_DATE_TIME=$(THE_CURRENT_TIME)
.if $(POWERSUPPLY) > 0
DEVICE_SPECIFIC_C = PowerSupply.c
DEVICE_SPECIFIC_H = PowerSupply.h
DEVICE_SPECIFIC_DEP =
#DEVICE_SPECIFIC_OBJ = PowerSupply.o
DEVICE_DEFINES = -DPOWERSUPPLY
MY_TARGET=sftardcalPS
.elif $(TESTER) > 0
DEVICE_SPECIFIC_C = Tester.c
DEVICE_SPECIFIC_H = Tester.h
DEVICE_SPECIFIC_DEP =
#DEVICE_SPECIFIC_OBJ =
DEVICE_DEFINES= -DTESTER
MY_TARGET=sftardcalT
.elif $(DUALSERIAL) > 0
DEVICE_SPECIFIC_C = DualSerial.c
DEVICE_SPECIFIC_H =
DEVICE_SPECIFIC_DEP =
DEVICE_DEFINES = -DDUALSERIAL
MY_TARGET=DualSerial
.else
DEVICE_SPECIFIC_C =
DEVICE_SPECIFIC_H =
DEVICE_SPECIFIC_DEP = xmodem.c xmodem.h
DEVICE_DEFINES = -DSTAND_ALONE -DWITH_XMODEM
MY_TARGET=sftardcal
.endif
.if $(DEBUG) > 0
DEVICE_DEFINES += -g
.else
DEVICE_DEFINES += -Wall
.endif
DEVICE_SPECIFIC := $(DEVICE_SPECIFIC_C) $(DEVICE_SPECIFIC_H) $(DEVICE_SPECIFIC_DEP)
all:: message $(MY_TARGET)
message:
@echo "Using BSDmakefile for BSD-compatible 'make'"
# all of the targets are in Makefile.incl
.include "Makefile.incl"