From 48c6d0ca4c82a190683380e45821159636080e51 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sun, 19 Dec 2004 05:04:19 +0000 Subject: simplified make system updated make system svn path=/trunk/; revision=2412 --- externals/grill/flext/build/win/make-mingw.inc | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 externals/grill/flext/build/win/make-mingw.inc (limited to 'externals/grill/flext/build/win/make-mingw.inc') diff --git a/externals/grill/flext/build/win/make-mingw.inc b/externals/grill/flext/build/win/make-mingw.inc new file mode 100644 index 00000000..3c4e4b1d --- /dev/null +++ b/externals/grill/flext/build/win/make-mingw.inc @@ -0,0 +1,68 @@ +LDFLAGS += -shared -Wl,-x + +ifdef DEBUG +CFLAGS += -g -D_DEBUG +else +CFLAGS += $(OFLAGS) -DNDEBUG +LDFLAGS += -Wl,-S +endif + +############################################## + +INCPATH += -I$(FLEXTPATH) +LIBPATH += -L$(FLEXTPATH) + +ifdef SHARED +# --- shared --- +DEFS += -DFLEXT_SHARED + +else +ifdef THREADED +# --- static multi-threaded --- +DEFS += -DFLEXT_THREADS + +else +# --- static single-threaded --- + +endif +endif + +############################################## + +TARGET=$(OUTPATH)/$(NAME).$(EXT) + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(OUTPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(OUTPATH)/%.opp,$(filter %.cpp,$(SRCS))) + + +# default target +all: $(OUTPATH) $(TARGET) + +#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) +# touch $@ + +$(OUTPATH): + -mkdir $(subst /,\,$@) + +$(OUTPATH)/%.opp : $(SRCDIR)/%.cpp + $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(OUTPATH)/%.o : $(SRCDIR)/%.c + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET) : $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS) + +$(INSTPATH): + -mkdir $(subst /,\,$@) + +install:: $(INSTPATH) + +install:: $(TARGET) + copy $(subst /,\,$^ $(INSTPATH)) + +.PHONY: clean +clean: + -del $(subst /,\,$(COBJS) $(CPPOBJS) $(TARGET)) -- cgit v1.2.1