summaryrefslogtreecommitdiffstats
path: root/src/electronics
diff options
context:
space:
mode:
Diffstat (limited to 'src/electronics')
-rw-r--r--src/electronics/CMakeLists.txt36
-rw-r--r--src/electronics/components/CMakeLists.txt49
-rw-r--r--src/electronics/components/piccomponent.cpp2
-rw-r--r--src/electronics/components/piccomponent.h2
-rw-r--r--src/electronics/components/piccomponentpin.cpp2
-rw-r--r--src/electronics/components/piccomponentpin.h2
-rw-r--r--src/electronics/gpsimprocessor.cpp19
-rw-r--r--src/electronics/gpsimprocessor.h2
-rw-r--r--src/electronics/simulation/CMakeLists.txt29
9 files changed, 138 insertions, 5 deletions
diff --git a/src/electronics/CMakeLists.txt b/src/electronics/CMakeLists.txt
new file mode 100644
index 0000000..781d0a0
--- /dev/null
+++ b/src/electronics/CMakeLists.txt
@@ -0,0 +1,36 @@
+add_subdirectory( simulation )
+add_subdirectory( components )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/electronics/simulation
+ ${CMAKE_SOURCE_DIR}/src/gui
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/micro
+ ${GLIB_INCLUDE_DIRS}
+ ${GPSIM_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### electronics (static)
+
+
+tde_add_library( electronics STATIC_PIC AUTOMOC
+
+ SOURCES
+ component.cpp subcircuits.cpp gpsimprocessor.cpp
+ switch.cpp pin.cpp wire.cpp ecnode.cpp port.cpp
+ LINK
+ components-static
+)
diff --git a/src/electronics/components/CMakeLists.txt b/src/electronics/components/CMakeLists.txt
new file mode 100644
index 0000000..7850d19
--- /dev/null
+++ b/src/electronics/components/CMakeLists.txt
@@ -0,0 +1,49 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/electronics/simulation
+ ${CMAKE_SOURCE_DIR}/src/gui
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/micro
+ ${GLIB_INCLUDE_DIRS}
+ ${GPSIM_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### components (static)
+
+tde_add_library( components STATIC_PIC AUTOMOC
+
+ SOURCES
+ ecresistor.cpp ecled.cpp ecdiode.cpp
+ ecsevensegment.cpp eckeypad.cpp
+ eccapacitor.cpp ec555.cpp eccurrentsource.cpp
+ ecfixedvoltage.cpp ecbcdto7segment.cpp
+ ecsignallamp.cpp ecclockinput.cpp
+ ecpotentiometer.cpp ecopamp.cpp ecvoltagesource.cpp
+ eccurrentsignal.cpp ecvoltagesignal.cpp
+ ecground.cpp multiinputgate.cpp fulladder.cpp
+ multiplexer.cpp demultiplexer.cpp externalconnection.cpp
+ ecsubcircuit.cpp meter.cpp probe.cpp resistordip.cpp
+ addac.cpp dependentsource.cpp flipflop.cpp
+ toggleswitch.cpp pushswitch.cpp ram.cpp
+ discretelogic.cpp piccomponent.cpp piccomponentpin.cpp
+ binarycounter.cpp bidirled.cpp matrixdisplay.cpp
+ bussplitter.cpp matrixdisplaydriver.cpp
+ magnitudecomparator.cpp serialportcomponent.cpp
+ parallelportcomponent.cpp inductor.cpp ecbjt.cpp
+ rotoswitch.cpp
+ LINK
+ elements-static
+)
diff --git a/src/electronics/components/piccomponent.cpp b/src/electronics/components/piccomponent.cpp
index 83038c1..57ff164 100644
--- a/src/electronics/components/piccomponent.cpp
+++ b/src/electronics/components/piccomponent.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "canvasitemparts.h"
diff --git a/src/electronics/components/piccomponent.h b/src/electronics/components/piccomponent.h
index 330fbf9..5bf4ac8 100644
--- a/src/electronics/components/piccomponent.h
+++ b/src/electronics/components/piccomponent.h
@@ -11,7 +11,9 @@
#ifndef PICCOMPONENT_H
#define PICCOMPONENT_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "component.h"
diff --git a/src/electronics/components/piccomponentpin.cpp b/src/electronics/components/piccomponentpin.cpp
index 47ef6cb..59790f1 100644
--- a/src/electronics/components/piccomponentpin.cpp
+++ b/src/electronics/components/piccomponentpin.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "micropackage.h"
diff --git a/src/electronics/components/piccomponentpin.h b/src/electronics/components/piccomponentpin.h
index cd41db9..8681cab 100644
--- a/src/electronics/components/piccomponentpin.h
+++ b/src/electronics/components/piccomponentpin.h
@@ -11,7 +11,9 @@
#ifndef PICCOMPONENTPIN_H
#define PICCOMPONENTPIN_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "logic.h"
diff --git a/src/electronics/gpsimprocessor.cpp b/src/electronics/gpsimprocessor.cpp
index c5ad638..c048cff 100644
--- a/src/electronics/gpsimprocessor.cpp
+++ b/src/electronics/gpsimprocessor.cpp
@@ -8,7 +8,14 @@
* (at your option) any later version. *
***************************************************************************/
+#if defined(QT_NO_STL)
+# define DISABLE_QT_NO_STL
+# undef QT_NO_STL
+#endif
+
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "asmparser.h"
@@ -50,8 +57,8 @@ void initialize_ConsoleUI();
extern void initialize_readline();
extern void gui_main(void);
extern void cli_main();
-void gpsim_version() {};
-void quit_gui() {};
+KDE_EXPORT void gpsim_version() {};
+KDE_EXPORT void quit_gui() {};
//BEGIN class GpsimProcessor
@@ -788,7 +795,6 @@ void RegisterSet::update()
//END class RegisterSet
-
//BEGIN class RegisterInfo
RegisterInfo::RegisterInfo( Register * reg )
{
@@ -815,7 +821,6 @@ RegisterInfo::RegisterInfo( Register * reg )
m_type = Invalid;
break;
}
-
m_name = m_pRegister->baseName();
}
@@ -880,7 +885,11 @@ DebugLine::DebugLine()
}
//END class DebugLine
-
#include "gpsimprocessor.moc"
+#endif
+// restore QT_NO_STL
+#if defined(DISABLE_QT_NO_STL)
+# undef DISABLE_QT_NO_STL
+# define QT_NO_STL
#endif
diff --git a/src/electronics/gpsimprocessor.h b/src/electronics/gpsimprocessor.h
index aae2605..6337300 100644
--- a/src/electronics/gpsimprocessor.h
+++ b/src/electronics/gpsimprocessor.h
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#ifndef GPSIMPROCESSOR_H
diff --git a/src/electronics/simulation/CMakeLists.txt b/src/electronics/simulation/CMakeLists.txt
new file mode 100644
index 0000000..ffe2399
--- /dev/null
+++ b/src/electronics/simulation/CMakeLists.txt
@@ -0,0 +1,29 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### elements (static)
+
+tde_add_library( elements STATIC_PIC AUTOMOC
+
+ SOURCES
+ cccs.cpp ccvs.cpp circuit.cpp currentsource.cpp
+ diode.cpp element.cpp elementset.cpp logic.cpp
+ matrix.cpp vccs.cpp vcvs.cpp voltagesource.cpp
+ capacitance.cpp resistance.cpp currentsignal.cpp
+ voltagepoint.cpp voltagesignal.cpp elementsignal.cpp
+ nonlinear.cpp reactive.cpp vec.cpp bjt.cpp
+ opamp.cpp inductance.cpp
+)