Skip to content

Commit

Permalink
copy the libomopcua.dll into the bin folder
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Apr 21, 2016
1 parent 3bd7ac2 commit c29d454
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SimulationRuntime/opc/ua/Makefile.common
Expand Up @@ -2,21 +2,30 @@ OBJS=omc_opc_ua.o open62541.o
.PHONY: test

all: default

default: libomopcua$(DLLEXT)
@test ! -z "$(OMBUILDDIR)" || (echo OMBUILDDIR not set; false)
cp libomopcua$(DLLEXT) "$(builddir_lib)"
test ! "$(DLLEXT)" = ".dll" || cp libomopcua$(DLLEXT) "$(builddir_bin)"

omc_opc_ua.o: omc_opc_ua.c omc_opc_ua.h open62541.h

open62541.o: open62541.c open62541.h

open62541.c: $(top_builddir)/3rdParty/open62541/open62541.c
cp "$<" "$@"

open62541.h: $(top_builddir)/3rdParty/open62541/open62541.h
cp "$<" "$@"

libomopcua$(DLLEXT): $(OBJS)
$(CC) -o "$@" $(CFLAGS) -shared $(OBJS) $(LDFLAGS)

test: test.c libomopcua.so
rm -f test
$(CC) -o test $(CFLAGS) test.c -ldl
./test

client: client.o libomopcua$(DLLEXT)
rm -f test
$(CC) -o client $(CFLAGS) client.o $(OBJS) $(LDFLAGS)
Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/opc/ua/Makefile.in
Expand Up @@ -5,6 +5,7 @@ DLLEXT=@DLLEXT@
LDFLAGS=-lpthread
OMBUILDDIR=@OMBUILDDIR@
builddir_lib=$(OMBUILDDIR)/lib/@host_short@/omc
builddir_bin=$(OMBUILDDIR)/bin
top_builddir=@top_builddir@

include Makefile.common
Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/opc/ua/Makefile.omdev.mingw
Expand Up @@ -4,6 +4,7 @@ CPPFLAGS=-I../../c
LDFLAGS=-lpthread -lwsock32
DLLEXT=.dll
builddir_lib=$(OMBUILDDIR)/lib/omc
builddir_bin=$(OMBUILDDIR)/bin
top_builddir=../../../

include Makefile.common

0 comments on commit c29d454

Please sign in to comment.