diff options
author | makefu <github@syntax-fehler.de> | 2011-08-20 23:21:48 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-08-20 23:21:48 +0200 |
commit | 37e09437c2f20ac269f8d2b7f9c7f7cd325f0585 (patch) | |
tree | e1ea709db90614f48c7d7b2a2162236b8ef69889 /oncology/dpfhack_display/unixdll.mk | |
parent | 9bbf4fa73c2d48864e58d624629bd4bac7a69673 (diff) |
oncology: initial commit
oncology will analyse the current krebs status
Diffstat (limited to 'oncology/dpfhack_display/unixdll.mk')
-rw-r--r-- | oncology/dpfhack_display/unixdll.mk | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/oncology/dpfhack_display/unixdll.mk b/oncology/dpfhack_display/unixdll.mk new file mode 100644 index 00000000..3130e02e --- /dev/null +++ b/oncology/dpfhack_display/unixdll.mk @@ -0,0 +1,101 @@ +# +# Common makefile to create a unix .so +# +# $Id: unixdll.mk 292 2010-01-07 19:35:21Z strubi $ +# + +OPTIMIZATIONS = -finline-functions #-O2 + +CXXFLAGS = $(INCLUDES) $(OPTIMIZATIONS) +CXXFLAGS += $(DLLFLAGS) +CXXFLAGS += -Wall -MD + +CFLAGS = $(INCLUDES) $(OPTIMIZATIONS) +CFLAGS += $(DLLFLAGS) +CFLAGS += -Wall -MD +CFLAGS += -fPIC + +ifdef RELEASE + CONFIG = Release +else + CONFIG = Debug +endif + +ifndef RELEASE + CFLAGS += $(DEBUGOPTS) +endif + +OBJDIR = $(CONFIG) + +ifndef PREFIX + PREFIX = . +endif + +DLLCOMMONOBJS = $(DLLCOMMONSRCS:%.c=$(OBJDIR)/%.o) +DLLCPPOBJS = $(DLLCPPSRCS:%.cpp=$(OBJDIR)/%.o) +DLLOBJS = $(DLLCSRCS:%.c=$(OBJDIR)/%.o) $(DLLCOMMONOBJS) +DLLOBJS += $(DLLCPPOBJS) +ifndef DLLINSTALLDIR + DLLINSTALLDIR = $(NETPP)/$(CONFIG) +endif + +# +# Please don't change this: +ifndef DLLTYPE + DLLTYPE = $(LIBNAME) +endif + +DLL = $(OBJDIR)/lib$(LIBNAME).so +STATICLIB = $(OBJDIR)/lib$(LIBNAME).a +DLLEXT = .so + +ifndef INSTALLBASE + INSTALLNAME = $(DLLTYPE) +else + INSTALLNAME = $(LIBNAME) +endif + +############################################################################ +# RULES +# + +$(OBJDIR)/%.o : %.cpp + $(CXX) -o $@ -c $< $(CXXFLAGS) + +$(OBJDIR)/%.o : %.c + $(CC) -o $@ -c $< $(CFLAGS) + +$(OBJDIR)/%.o: $(PREFIX)/%.c + $(CC) -o $@ -c $< $(CFLAGS) + +$(OBJDIR)/%.o: $(COMMONSRCDIR)/%.c + $(CC) -o $@ -c $< $(CFLAGS) + +dll: $(DLL) + +$(DLL): dirs $(DLLOBJS) + $(CC) -o $(DLL) -shared $(DLLOBJS) $(DLLDEPS) + + +# Make DLL directory, if it does not exist +$(OBJDIR): + [ -e $(OBJDIR) ] || mkdir $(OBJDIR) + +dirs: $(OBJDIR) + +$(STATICLIB): dirs $(DLLOBJS) + $(AR) ruv $(STATICLIB) $(DLLOBJS) + +libclean: + rm -f $(DLL) $(STATICLIB) + +installdll:: $(DLL) + [ -e $(DLLINSTALLDIR) ] || mkdir $(DLLINSTALLDIR) + cp $(DLL) $(DLLINSTALLDIR)/lib$(INSTALLNAME).so + +clean:: + rm -f $(DLLOBJS) + rm -fr Debug/ Release/ + rm -f *.d + rm -fr $(NETPP)/Debug + rm -fr $(NETPP)/Release |