Commit 1e046407 authored by thomas's avatar thomas
Browse files

updated build system - some cleanups

git-svn-id: https://svn.grrrr.org/ext/trunk@938 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent fb50a854
......@@ -18,15 +18,15 @@ PKGINFO=package.txt
# check variables
!ifndef BUILDCLASS
!error BUILDCLASS must be specified in $(PKGINFO)
BUILDCLASS=ext
!endif
!ifndef BUILDMODE
!error BUILDMODE must be specified in $(PKGINFO)
BUILDMODE=release
!endif
!ifndef BUILDTYPE
!error BUILDTYPE must be specified in $(PKGINFO)
BUILDTYPE=single
!endif
##############################
......@@ -46,7 +46,7 @@ SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def
OPTIONS=-f $(BUILDPATH)bmake-sub.mak -N \
PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \
BUILDPATH=$(BUILDPATH) PKGINFO=$(PKGINFO)
BUILDPATH=$(BUILDPATH) PKGINFO=$(PKGINFO) BUILDCLASS=$(BUILDCLASS)
###############################################
......
......@@ -18,15 +18,15 @@ include $(PKGINFO)
# check variables
ifndef BUILDCLASS
error BUILDCLASS must be specified in $(PKGINFO)
BUILDCLASS=ext
endif
ifndef BUILDMODE
error BUILDMODE must be specified in $(PKGINFO)
BUILDMODE=release
endif
ifndef BUILDTYPE
error BUILDTYPE must be specified in $(PKGINFO)
BUILDTYPE=single
endif
##############################
......@@ -55,7 +55,7 @@ SYSDEFAULT=$(UBUILDPATH)$(PLATFORM)/$(RTSYS)/config-$(COMPILER).def
OPTIONS=-f $(UBUILDPATH)gnumake-sub.mak \
PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \
BUILDPATH=$(UBUILDPATH) PKGINFO=$(PKGINFO)
BUILDPATH=$(UBUILDPATH) PKGINFO=$(PKGINFO) BUILDCLASS=$(BUILDCLASS)
###############################################
......
......@@ -3,19 +3,19 @@
INCPATH += -I$(FLEXTINC)
LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
LIBS += -l$(FLEXTNAME)
# obviously header precompilation os still buggy with gcc 3.3
# obviously header precompilation os still buggy with gcc 3.3
ifdef PRECOMPILE
#PRECOMSRC=$(SRCDIR)/$(PRECOMPILE)
else
#PRECOMSRC=$(FLEXTINC)/flext.h
endif
ifdef PRECOMSRC
PRECOMDST=$(OBJPATH)/$(notdir $(PRECOMSRC)).gch
PRECOMINC = -include $(OBJPATH)/$(notdir $(PRECOMSRC))
endif
#PRECOMSRC=$(SRCDIR)/$(PRECOMPILE)
else
#PRECOMSRC=$(FLEXTINC)/flext.h
endif
ifdef PRECOMSRC
PRECOMDST=$(OBJPATH)/$(notdir $(PRECOMSRC)).gch
PRECOMINC = -include $(OBJPATH)/$(notdir $(PRECOMSRC))
endif
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
......@@ -39,9 +39,9 @@ $(OBJPATH):
$(TARGETPATH):
-mkdir -p $(TARGETPATH)
$(PRECOMDST) : $(PRECOMSRC)
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(PRECOMDST) : $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS))
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $< -o $@
......@@ -63,7 +63,7 @@ _clean_:
##############################################
# Attention: $@ doesn't work for paths with spaces....
$(INSTPATH):
$(INSTPATH):
-mkdir -p $(INSTPATH)
_install_:: $(INSTPATH)
......
# build class specific settings
ifdef SHARED
ifdef SHARED
#LDFLAGS += -dylib_install_name $(FLEXTSHLIB)/$(OUTNAME).$(EXT)
endif
endif
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
......@@ -22,16 +22,16 @@ $(OBJPATH):
$(TARGETPATH):
-mkdir -p $@
ifdef PRECOMPILE
PRECOMSRC=$(SRCDIR)/$(PRECOMPILE)
PRECOMDST=$(OBJPATH)/$(notdir $(PRECOMSRC)).gch
PRECOMINC = -include $(OBJPATH)/$(notdir $(PRECOMSRC))
endif
$(PRECOMDST): $(PRECOMSRC)
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
ifdef PRECOMPILE
PRECOMSRC=$(SRCDIR)/$(PRECOMPILE)
PRECOMDST=$(OBJPATH)/$(notdir $(PRECOMSRC)).gch
PRECOMINC = -include $(OBJPATH)/$(notdir $(PRECOMSRC))
endif
$(PRECOMDST): $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS))
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $< -o $@
......@@ -39,15 +39,15 @@ $(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH)
$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS)
ifdef SHARED
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
else
else
libtool -static -o $@ $(COBJS) $(CPPOBJS)
endif
##############################################
_clean_:
......@@ -69,9 +69,9 @@ $(FLEXTLIBINST):
-mkdir -p $@
_install_: $(FLEXTINC) $(FLEXTLIBINST)
install $(TARGET) $(FLEXTLIBINST)
ifndef SHARED
# have to rerun ranlib at install dir ?!
ranlib $(FLEXTLIBINST)/$(notdir $(TARGET))
install $(TARGET) $(FLEXTLIBINST)
ifndef SHARED
# have to rerun ranlib at install dir ?!
ranlib $(FLEXTLIBINST)/$(notdir $(TARGET))
endif
install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC)
......@@ -18,15 +18,15 @@ PKGINFO=package.txt
# check variables
!ifndef BUILDCLASS
!error BUILDCLASS must be specified in $(PKGINFO)
BUILDCLASS=ext
!endif
!ifndef BUILDMODE
!error BUILDMODE must be specified in $(PKGINFO)
BUILDMODE=release
!endif
!ifndef BUILDTYPE
!error BUILDTYPE must be specified in $(PKGINFO)
BUILDTYPE=single
!endif
##############################
......@@ -46,7 +46,7 @@ SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def
OPTIONS=-f $(BUILDPATH)nmake-sub.mak \
PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \
BUILDPATH=$(BUILDPATH) PKGINFO=$(PKGINFO)
BUILDPATH=$(BUILDPATH) PKGINFO=$(PKGINFO) BUILDCLASS=$(BUILDCLASS)
###############################################
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment