Browse Source

move data to src, to become python modules

master
heck 5 years ago
parent
commit
05fc182c26
  1. 25
      gen/data/input/synth_shed/Makefile
  2. 0
      gen/src/Makefile
  3. 55
      gen/src/synth_shed/Makefile
  4. 0
      gen/src/synth_shed/main.c
  5. 15
      gen/src/synth_shed/py_module.cc
  6. 0
      gen/src/synth_shed/synth_shed.c
  7. 0
      gen/src/synth_shed/synth_shed.h
  8. 0
      gen/src/test_data/Makefile
  9. 0
      gen/src/test_data/enums.h
  10. 0
      gen/src/test_data/functions.h
  11. 0
      gen/src/test_data/main.c
  12. 0
      gen/src/test_data/structs.h
  13. 0
      gen/src/test_data/test_lib.c
  14. 0
      gen/src/test_data/test_lib.h
  15. 0
      gen/src/test_data/typedefs.h
  16. 0
      gen/src/test_data/vars.h

25
gen/data/input/synth_shed/Makefile

@ -1,25 +0,0 @@
TARGET=synth_shed
SRCS+=$(wildcard *.c)
CFLAGS+=-std=c99 -g
INCLUDES+=
LIB_DIRS+=
LIBS+=
LDFLAGS+=
CXXFLAGS+=$(INCLUDES)
LDFLAGS+=$(LIB_DIRS+)
LDFLAGS+=$(LIBS)
OBJS+=$(SRCS:.c=.o)
.PHONY: all, clean
all: $(TARGET)
$(TARGET) : $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
clean:
rm -f $(TARGET)
rm -f $(OBJS)

0
gen/data/input/Makefile → gen/src/Makefile

55
gen/src/synth_shed/Makefile

@ -0,0 +1,55 @@
TARGET_EXE=synth_shed
TARGET_MODULE=synth_shed.so
PREFIX=/Users/heck/local-default
# C
CFLAGS+=-std=c99 -g
# C++
CXX=clang
CXXFLAGS+=-std=c++11 -g
# Sources
SRCS_C+=$(wildcard *.c)
SRCS_CXX+=$(wildcard *.cc)
# deps
INCLUDES+=-I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8
INCLUDES+=-I$(PREFIX)/include
#Link
C_LDFLAGS+=
CXX_LDFLAGS+=-undefined dynamic_lookup
CXXFLAGS+=$(INCLUDES)
OBJS_C+=$(SRCS_C:.c=.o)
OBJS_CXX+=$(SRCS_CXX:.cc=.o)
OBJS = $(OBJS_C) $(OBJS_CXX)
$(info -----BUILD INFO----)
$(info SRCS_C $(SRCS_C))
$(info SRCS_CXX $(SRCS_CXX))
$(info OBJS_C $(OBJS_C))
$(info OBJS_CXX $(OBJS_CXX))
$(info OBJS $(OBJS))
.PHONY: all exe module clean
all: exe module
exe: $(TARGET_EXE)
module: $(TARGET_MODULE)
$(TARGET_EXE) : $(OBJS_C)
$(CC) $(C_LDFLAGS) -o $@ $^
$(TARGET_MODULE) : $(OBJS)
$(CXX) $(CXX_LDFLAGS) -o $@ $^
clean:
rm -f $(TARGET_EXE)
rm -f $(TARGET_MODULE)
rm -f $(OBJS)

0
gen/data/input/synth_shed/main.c → gen/src/synth_shed/main.c

15
gen/src/synth_shed/py_module.cc

@ -0,0 +1,15 @@
#include <string>
#include <pybind11/pybind11.h>
#include <pybind11/detail/common.h>
using namespace std;
PYBIND11_MODULE(_pybind, m) {
m.doc() = "pybind11 example plugin"; // optional module docstring
}

0
gen/data/input/synth_shed/synth_shed.c → gen/src/synth_shed/synth_shed.c

0
gen/data/input/synth_shed/synth_shed.h → gen/src/synth_shed/synth_shed.h

0
gen/data/input/test_data/Makefile → gen/src/test_data/Makefile

0
gen/data/input/test_data/enums.h → gen/src/test_data/enums.h

0
gen/data/input/test_data/functions.h → gen/src/test_data/functions.h

0
gen/data/input/test_data/main.c → gen/src/test_data/main.c

0
gen/data/input/test_data/structs.h → gen/src/test_data/structs.h

0
gen/data/input/test_data/test_lib.c → gen/src/test_data/test_lib.c

0
gen/data/input/test_data/test_lib.h → gen/src/test_data/test_lib.h

0
gen/data/input/test_data/typedefs.h → gen/src/test_data/typedefs.h

0
gen/data/input/test_data/vars.h → gen/src/test_data/vars.h

Loading…
Cancel
Save