diff --git a/lib/Makefile b/lib/Makefile index 5a16cabc12bef5a6c8d0ccfc8b0812bfde26ed92..3ca1e03bb8159d6b02c4b3383ebeafa16585cbd7 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,19 +1,23 @@ +.PHONY: all all: cd c ; make cd csharp ; make cd java ; make +.PHONY: test test: $(MAKE) -C c test +.PHONY: clean clean: - cd c ; make clean - cd csharp ; make clean - cd java ; make clean + $(MAKE) -C c clean + $(MAKE) -C csharp clean + $(MAKE) -C java clean $(MAKE) -C python clean +.PHONY: distclean distclean: - cd c ; make distclean - cd csharp ; make clean - cd java ; make clean - $(MAKE) -C python clean + $(MAKE) -C c distclean + $(MAKE) -C csharp distclean + $(MAKE) -C java distclean + $(MAKE) -C python distclean diff --git a/lib/c/2006/labcomm2006_ioctl.h b/lib/c/2006/labcomm2006_ioctl.h index 22794babca46cf928d0b4b03bcc72a6913cd61ab..47b48dd0bf55cafb8a46837069e630967055af63 100644 --- a/lib/c/2006/labcomm2006_ioctl.h +++ b/lib/c/2006/labcomm2006_ioctl.h @@ -84,23 +84,14 @@ LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_NONE,type,nr,0) #define LABCOMM_IOR(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_READ,type,nr,sizeof(size)) -/* FIXME: add flag to differentiate between size and nargs */ -#define LABCOMM_IORN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_READ,type,nr,nargs) #define LABCOMM_IOW(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_WRITE,type,nr,sizeof(size)) -#define LABCOMM_IOWN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_WRITE,type,nr,nargs) #define LABCOMM_IOS(type,nr) \ LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_READ,type,nr,0) #define LABCOMM_IOSR(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_READ,type,nr,sizeof(size)) -#define LABCOMM_IOSRN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_READ,type,nr,nargs) #define LABCOMM_IOSW(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_WRITE,type,nr,sizeof(size)) -#define LABCOMM_IOSWN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_WRITE,type,nr,nargs) #define LABCOMM_IOCTL_WRITER_GET_BYTES_WRITTEN \ LABCOMM_IOR(0,1,int) diff --git a/lib/c/2014/labcomm_ioctl.h b/lib/c/2014/labcomm_ioctl.h index 1ebf6531d4000ebfb2392a547eaf1f2a1f589b80..9711eb7d826c9e55603a1310f2555e73486255b0 100644 --- a/lib/c/2014/labcomm_ioctl.h +++ b/lib/c/2014/labcomm_ioctl.h @@ -84,23 +84,14 @@ LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_NONE,type,nr,0) #define LABCOMM_IOR(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_READ,type,nr,sizeof(size)) -/* FIXME: add flag to differentiate between size and nargs */ -#define LABCOMM_IORN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_READ,type,nr,nargs) #define LABCOMM_IOW(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_WRITE,type,nr,sizeof(size)) -#define LABCOMM_IOWN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_NOSIG,LABCOMM_IOC_WRITE,type,nr,nargs) -#define LABCOMM_IOS(type,nr) \ +#define LABCOMM_IOS(type,nr) \ LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_READ,type,nr,0) #define LABCOMM_IOSR(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_READ,type,nr,sizeof(size)) -#define LABCOMM_IOSRN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_READ,type,nr,nargs) #define LABCOMM_IOSW(type,nr,size) \ LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_WRITE,type,nr,sizeof(size)) -#define LABCOMM_IOSWN(type,nr,nargs) \ - LABCOMM_IOC(LABCOMM_IOC_USESIG,LABCOMM_IOC_WRITE,type,nr,nargs) #define LABCOMM_IOCTL_WRITER_GET_BYTES_WRITTEN \ LABCOMM_IOR(0,1,int) diff --git a/lib/csharp/LabComm.csproj b/lib/csharp/LabComm.csproj deleted file mode 100644 index c6406ea5d3069279beb23378a5cec15524b6be46..0000000000000000000000000000000000000000 --- a/lib/csharp/LabComm.csproj +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <OutputType>Library</OutputType> - <AssemblyName>LabComm</AssemblyName> - <ProjectGuid>{755CD5A6-C48E-4D35-B0BE-8EC0FDE1A2A1}</ProjectGuid> - <!-- Properties which affect the build process --> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)' == 'Debug'"> - <OutputPath>bin\Debug\</OutputPath> - </PropertyGroup> - <ItemGroup> - <Compile Include="se\lth\control\labcomm\LabCommDispatcher.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommDecoderRegistry.cs" /> - <Compile Include="se\lth\control\labcomm\LabComm.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommSample.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommHandler.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommEncoderRegistry.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommDecoder.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommType.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommEncoderChannel.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommEncoder.cs" /> - <Compile Include="se\lth\control\labcomm\LabCommDecoderChannel.cs" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -</Project> \ No newline at end of file diff --git a/lib/csharp/Makefile b/lib/csharp/Makefile index 370c77e2fce1d12e48fa99ff3ce766feab2748b7..1a18f3b93c64c0d8db5ca055693e00bf10effcc5 100644 --- a/lib/csharp/Makefile +++ b/lib/csharp/Makefile @@ -16,4 +16,6 @@ labcomm.dll: $(MODULES:%=se/lth/control/labcomm/%.cs) Makefile mcs -out:$@ -target:library $(filter %.cs, $^) clean: + +distclean: rm -f labcomm.dll diff --git a/lib/java/Makefile b/lib/java/Makefile index fc0daff85a6faff68037b472dc989aa1250630e7..50705cdd7febf5a827a7c9554196ff014cf58f53 100644 --- a/lib/java/Makefile +++ b/lib/java/Makefile @@ -20,31 +20,38 @@ MODULES=Constant \ all: labcomm.jar labcomm2014.jar labcomm2006.jar -labcomm.jar: gen/JAVAC +labcomm.jar: gen/JAVAC osgi-manifest-all.txt echo $@ - cd gen ; jar cfm ../$@ ../osgi-manifest.txt se/lth/control/labcomm/*.class se/lth/control/labcomm2006/*.class + cd gen ; jar cfm ../$@ ../osgi-manifest-all.txt \ + se/lth/control/labcomm/*.class \ + se/lth/control/labcomm2006/*.class -labcomm2014.jar: gen/JAVAC +labcomm2014.jar: gen/JAVAC osgi-manifest-2014.txt echo $@ - cd gen ; jar cfm ../$@ ../osgi-manifest.txt se/lth/control/labcomm/*.class + cd gen ; jar cfm ../$@ ../osgi-manifest-2014.txt \ + se/lth/control/labcomm/*.class -labcomm2006.jar: gen/JAVAC +labcomm2006.jar: gen/JAVAC osgi-manifest-2006.txt echo $@ - cd gen ; jar cfm ../$@ ../osgi-manifest.txt se/lth/control/labcomm2006/*.class + cd gen ; jar cfm ../$@ ../osgi-manifest-2006.txt \ + se/lth/control/labcomm2006/*.class gen: mkdir gen -gen/JAVAC: $(MODULES:%=se/lth/control/labcomm/%.java) $(MODULES:%=se/lth/control/labcomm2006/%.java) Makefile | gen - javac -cp ../../compiler/labcomm_compiler.jar -d gen $(filter %.java, $^) +gen/JAVAC: $(MODULES:%=se/lth/control/labcomm/%.java) \ + $(MODULES:%=se/lth/control/labcomm2006/%.java) \ + Makefile | gen + javac -cp ../../compiler/labcomm_compiler.jar -d gen \ + $(filter %.java, $^) touch $@ .PHONY: clean - clean: - rm -rf labcomm.jar labcomm2006.jar labcomm2014.jar gen + rm -rf gen .PHONY: distclean +distclean: + rm -rf labcomm.jar labcomm2006.jar labcomm2014.jar -distclean: clean diff --git a/lib/java/osgi-manifest-2006.txt b/lib/java/osgi-manifest-2006.txt new file mode 100644 index 0000000000000000000000000000000000000000..4ef6bdac0f7ccc0b4fe0c729b46bb81d67d36dce --- /dev/null +++ b/lib/java/osgi-manifest-2006.txt @@ -0,0 +1,7 @@ +Bundle-Description: Provides Labcomm to bundles +Bundle-ManifestVersion: 2 +Bundle-Name: Labcomm OSGi +Bundle-SymbolicName: se.lth.control.labcomm2006 +Bundle-Vendor: LTH +Bundle-Version: 1.0.0 +Export-Package: se.lth.control.labcomm2006;version="1.0.0" diff --git a/lib/java/osgi-manifest-2014.txt b/lib/java/osgi-manifest-2014.txt new file mode 100644 index 0000000000000000000000000000000000000000..53d3954c8f022190a5163fedf2421fe8795ab77d --- /dev/null +++ b/lib/java/osgi-manifest-2014.txt @@ -0,0 +1,7 @@ +Bundle-Description: Provides Labcomm 2014 to bundles +Bundle-ManifestVersion: 2 +Bundle-Name: Labcomm OSGi +Bundle-SymbolicName: se.lth.control.labcomm2014 +Bundle-Vendor: LTH +Bundle-Version: 1.0.0 +Export-Package: se.lth.control.labcomm;version="1.0.0" diff --git a/lib/java/osgi-manifest-all.txt b/lib/java/osgi-manifest-all.txt new file mode 100644 index 0000000000000000000000000000000000000000..4a691e7fffa1ae585f7c245174645f61f2b605d7 --- /dev/null +++ b/lib/java/osgi-manifest-all.txt @@ -0,0 +1,8 @@ +Bundle-Description: Provides Labcomm 2006/2014 to bundles +Bundle-ManifestVersion: 2 +Bundle-Name: Labcomm OSGi +Bundle-SymbolicName: se.lth.control.labcomm-all +Bundle-Vendor: LTH +Bundle-Version: 1.0.0 +Export-Package: se.lth.control.labcomm2006;version="1.0.0", + se.lth.control.labcomm;version="1.0.0" diff --git a/lib/java/osgi-manifest.txt b/lib/java/osgi-manifest.txt deleted file mode 100644 index 49ca3d6cd68f2212c9ab0d74a709ed38c6a2c233..0000000000000000000000000000000000000000 --- a/lib/java/osgi-manifest.txt +++ /dev/null @@ -1,8 +0,0 @@ -Bundle-Description: Provides Labcomm to bundles -Bundle-ManifestVersion: 2 -Bundle-Name: Labcomm OSGi -Bundle-SymbolicName: se.lth.control.labcomm -Bundle-Vendor: LTH -Bundle-Version: 1.0.0 -Export-Package: se.lth.control.labcomm;version="1.0.0",se.lth.control.la - bcomm2006;version="1.0.0" diff --git a/lib/python/Makefile b/lib/python/Makefile index 7798ea9c77f5297ce46b92db52dce08cb5022453..52022dde18e2646191216a34b6760601f405e724 100644 --- a/lib/python/Makefile +++ b/lib/python/Makefile @@ -1,5 +1,6 @@ +.PHONY: clean clean: find . -name '*.pyc' -exec rm {} \; -distclean: - find . -name '*.pyc' -exec rm {} \; +.PHONY: distclean +distclean: clean