source: TECS-SimpleSample/tags/SimpleSample-20120707/SimpleSampleOpaqueRPC/Makefile@ 473

Last change on this file since 473 was 36, checked in by okuma-top, 12 years ago

automatically chose tecsgen.exe or tecsgen

File size: 1.5 KB
Line 
1# 変数 #_MVAR_#
2TARGET = SimpleSample.exe
3TIMESTAMP = tecsgen.timestamp
4ifeq ($(OS),Windows_NT)
5 TECSGEN_EXE = tecsgen.exe
6else
7 # use below if you want to use non-exerb version of tecsgen.
8 TECSGEN_EXE = tecsgen
9endif
10TECSPATHR = ../../tecsgen/tecs
11BASE_DIR = .
12CC = gcc
13INCLUDE = -I $(BASE_DIR)/. -I $(TECSPATHR) -I $(TECSPATHR)/../test/cygwin -I $(TECSPATHR)/rpc -I $(GEN_DIR)
14CFLAGS = $(INCLUDE) -I $(BASE_DIR)/src -I $(GEN_DIR) -D "Inline=static inline"
15LD = gcc
16LDFLAGS = -lpthread
17GEN_DIR = $(BASE_DIR)/gen
18SRC_DIR = $(BASE_DIR)/src
19_TECS_OBJ_DIR = $(GEN_DIR)/
20# _TECS_OBJ_DIR # should be end with '/'
21
22vpath %.c $(SRC_DIR) $(GEN_DIR) $(TECSPATHR) $(TECSPATHR)/rpc $(TECSPATHR)/../test/cygwin
23vpath %.h $(SRC_DIR) $(GEN_DIR) $(TECSPATHR) $(TECSPATHR)/rpc $(TECSPATHR)/../test/cygwin
24
25# OTHER_OBJS = # Add objects out of tecs care.
26OTHER_OBJS = $(_TECS_OBJ_DIR)vasyslog.o
27
28# ルール #_MRUL_#
29allall: tecs
30 make all # in order to include generated Makefile.tecsgen & Makefile.depend
31
32all : sub_regions
33
34
35# depend を include #_MDEP_#
36-include $(GEN_DIR)/Makefile.tecsgen
37
38sub_regions:$(TIMESTAMP)
39 cd rSample; make all
40 cd rSimple; make all
41
42clean :
43 cd rSample; make clean
44 cd rSimple; make clean
45 rm -f $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(TARGET) $(TIMESTAMP)
46 rm -rf $(GEN_DIR)
47
48tecs : $(TIMESTAMP)
49
50$(TIMESTAMP) : $(TECS_IMPORTS)
51 $(TECSGEN_EXE) $(INCLUDE) -k euc -I src SimpleSample.cdl
52 touch $(TIMESTAMP)
53
54# generic target for objs
55$(_TECS_OBJ_DIR)%.o : %.c
56 $(CC) -c $(CFLAGS) -o $@ $<
57
Note: See TracBrowser for help on using the repository browser.