-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmdln.mk
33 lines (26 loc) · 1.07 KB
/
cmdln.mk
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
# ------------------------------------------------------------------------------
# command line options
# ------------------------------------------------------------------------------
# ----------------------------------------------------------
# build cmdln.o
# ----------------------------------------------------------
$(CMDL_OBJ_PATH)/%.o : $(CMDL_SRC_PATH)/%.c
$(CC) $(CCOPT) -I. $< -o $@
# ----------------------------------------------------------
# set up libraries part
# ----------------------------------------------------------
CLO_OWN_LIB =
ifneq ($(AROWN),)
CLO_OWN_LIB += $(AROWN)
endif
ifneq ($(LSOWN),)
CLO_OWN_LIB += $(addprefix lib,$(LSOWN))
endif
# ----------------------------------------------------------
# create sources cmdln.c and cmdln.h
# ----------------------------------------------------------
$(CMDL_SRC_PATH)/%.c : etc/%.ini $(CMDL_SRC_PATH)/%.h
$(CLO) -t c -i $< -c $@ -h $(subst .c,.h,$@) -l $(CLO_OWN_LIB)
$(CMDL_SRC_PATH)/%.h : etc/%.ini
$(CLO) -t h -i $< -h $@ -c $(subst .h,.c,$@) -l $(CLO_OWN_LIB)
$(MAIN.D) : $(CMDL_SRC_PATH)/cmdln.h