aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/makefile.pd-mingw
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/makefile.pd-mingw')
-rw-r--r--externals/grill/flext/makefile.pd-mingw47
1 files changed, 25 insertions, 22 deletions
diff --git a/externals/grill/flext/makefile.pd-mingw b/externals/grill/flext/makefile.pd-mingw
index 9a7db3a5..ac62dda1 100644
--- a/externals/grill/flext/makefile.pd-mingw
+++ b/externals/grill/flext/makefile.pd-mingw
@@ -7,24 +7,24 @@
# to build run "make -f makefile.pd-mingw"
#
# ---------------------------------------------
-#
-# compiling for threaded usage is not supported
-#
+
CONFIG=config-pd-mingw.txt
+MAKEFILE=makefile.pd-mingw
include $(CONFIG)
# compiler+linker stuff
-INCLUDES=$(PDPATH)/src # /usr/include
+INCLUDES=$(PDPATH)/src
FLAGS=-DFLEXT_SYS=2 $(UFLAGS)
CFLAGS=-O2
CFLAGS_D=-DFLEXT_DEBUG -g
CFLAGS_T=-DFLEXT_THREADS
-CFLAGS_S=-DFLEXT_SHARED
-LIBS=
+CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
+
+PDLIBS=$(PDPATH)/bin/pd.dll $(PDPATH)/bin/pthreadVC.dll
INSTDIR=$(PDPATH)/flext
@@ -50,64 +50,67 @@ SRCS+=$(SRCS_STK)
HDRS+=$(HDRS_STK)
endif
-MAKEFILE=makefile.pd-mingw
+
TARGET=$(TARGDIR)/$(NAME)-pdwin.lib
TARGET_D=$(TARGDIR)/$(NAME)_d-pdwin.lib
TARGET_T=$(TARGDIR)/$(NAME)_t-pdwin.lib
TARGET_TD=$(TARGDIR)/$(NAME)_td-pdwin.lib
+TARGET_S=$(TARGDIR)/$(NAME).dll
+TARGET_SD=$(TARGDIR)/$(NAME)_d.dll
-TARGETS=$(TARGET) $(TARGET_D) # $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
+TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
all: $(TARGDIR) $(TARGETS)
+
$(TARGDIR):
-mkdir $(TARGDIR)
$(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE) $(CONFIG)
- touch $@
-
+# echo touch $@ # minGW has no touch
-$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.ro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.do : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.to : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.tro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.so : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.sro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS))
+$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
- $(CXX) -o $@ $^
+$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
+ $(CXX) -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
+ strip --strip-unneeded $@
chmod 755 $@
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- $(CXX) -o $@ $^
+ $(CXX) -g -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
chmod 755 $@