Commit | Line | Data |
---|---|---|
970ed795 | 1 | ############################################################################### |
3abe9331 | 2 | # Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
3 | # All rights reserved. This program and the accompanying materials |
4 | # are made available under the terms of the Eclipse Public License v1.0 | |
5 | # which accompanies this distribution, and is available at | |
6 | # http://www.eclipse.org/legal/epl-v10.html | |
7 | ############################################################################### | |
8 | # | |
9 | # "org_eclipse_titan_executor_jni_JNIMiddleWare.h" is generated by javah (java header generator tool) | |
10 | # DO NOT EDIT THAT FILE UNLESS YOU KNOW WHAT YOU ARE DOING | |
11 | # | |
12 | # CLI command for header generation: | |
13 | # > javah -classpath . -jni org.eclipse.titan.executor.jni.JNIMiddleWare | |
14 | # - must be issued in the /bin direcory within the project | |
15 | ||
16 | TOP := .. | |
17 | include $(TOP)/Makefile.cfg | |
18 | ||
19 | CPPFLAGS += -I$(JDKDIR)/include | |
20 | ifeq ($(PLATFORM), WIN32) | |
21 | CPPFLAGS += -D__int64='long long' | |
22 | endif | |
23 | ||
24 | ifeq ($(PLATFORM), LINUX) | |
25 | CPPFLAGS += -I$(JDKDIR)/include/linux | |
26 | endif | |
27 | ifeq ($(PLATFORM), SOLARIS) | |
28 | CPPFLAGS += -I$(JDKDIR)/include/solaris | |
29 | endif | |
30 | ifeq ($(PLATFORM), SOLARIS8) | |
31 | CPPFLAGS += -I$(JDKDIR)/include/solaris | |
32 | endif | |
33 | ||
34 | STATIC_SOURCES := jnimw.cc jninativelib.cc | |
35 | HEADERS := jnimw.h org_eclipse_titan_executor_jni_JNIMiddleWare.h | |
36 | ||
37 | SOURCES := $(STATIC_SOURCES) | |
38 | ||
39 | OBJECTS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SOURCES))) | |
40 | ||
41 | OTHER_OBJECTS := $(TOP)/mctr2/mctr/MctrError.o $(TOP)/mctr2/mctr/MainController.o \ | |
42 | $(TOP)/mctr2/mctr/UserInterface.o $(TOP)/common/memory.o \ | |
43 | $(TOP)/common/new.o $(TOP)/core/Textbuf.o $(TOP)/core/RInt.o $(TOP)/common/NetworkHandler.o \ | |
44 | $(TOP)/mctr2/cli/config_read.lex.o $(TOP)/mctr2/cli/config_read.tab.o $(TOP)/mctr2/mctr/config_data.o \ | |
45 | $(TOP)/common/config_preproc_p.tab.o $(TOP)/common/config_preproc.o $(TOP)/common/config_preproc_la.o \ | |
46 | $(TOP)/common/path.o $(TOP)/common/memory.o $(TOP)/common/Path2.o | |
47 | ||
48 | ifeq ($(LICENSING), yes) | |
49 | OTHER_OBJECTS += $(TOP)/common/license.o | |
50 | endif | |
51 | ||
52 | TARGETS := libmctrjninative.so | |
53 | ||
54 | SOLARIS_LIBS = | |
55 | SOLARIS8_LIBS := -lsocket -lnsl | |
56 | LINUX_LIBS := | |
57 | FREEBSD_LIBS = | |
58 | WIN32_LIBS = | |
59 | ||
60 | # | |
61 | # Rules for building the executable... | |
62 | # | |
63 | all run: $(TARGETS); | |
64 | ||
65 | libmctrjninative.so: $(OBJECTS) $(OTHER_OBJECTS) | |
66 | $(LD) $(LDFLAGS) -o $@ $^ \ | |
67 | $($(PLATFORM)_LIBS) -lpthread $(LICENSE_LIBS) -L$(OPENSSL_DIR)/lib -lcrypto | |
68 | ||
69 | install: $(TARGETS) | |
70 | ifeq ($(DEBUG), no) | |
71 | $(STRIP) $(TARGETS) | |
72 | endif | |
73 | mkdir -p $(LIBDIR) | |
74 | cp $(TARGETS) $(LIBDIR) | |
75 | ||
76 | include $(TOP)/Makefile.genrules |