diff --git a/Makefile b/Makefile index 9ae0d29..05a62ed 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ - - HEADERS = csm.h Error.h Warning.h Version.h Isd.h BytestreamIsd.h NitfIsd.h Plugin.h Model.h GeometricModel.h RasterGM.h CorrelationModel.h FourParameterCorrelationModel.h LinearDecayCorrelationModel.h OBJS = Version.o Plugin.o GeometricModel.o RasterGM.o CorrelationModel.o FourParameterCorrelationModel.o LinearDecayCorrelationModel.o Isd.o @@ -27,7 +25,9 @@ LD=$(CC) $(CC) -c $(COPTS) $< -o $@ $(LIBRARY): $(OBJS) - $(LD) $(COPTS) $(LDOPTS) $^ $(LIBS) -o $@ + @echo $(LIBRARY) + @echo $@ + $(LD) $(COPTS) $(LDOPTS) $^ $(LIBS) -o $(LIBRARY) all: $(HEADERS) $(LIBRARY) diff --git a/Makefile.linux64 b/Makefile.linux64 index 3a3bc2a..1503c87 100644 --- a/Makefile.linux64 +++ b/Makefile.linux64 @@ -1,6 +1,7 @@ include Makefile CC=g++ -COPTS=-fPIC -O2 -m64 -Wall -LDOPTS=-shared -Wl,-soname,$(LIBRARY) +#CXXFLAGS=-std=c++11 +COPTS=-fPIC -O2 -m64 -Wall -std=c++11 -c +LDOPTS=-shared -Wl,-install_name,$(LIBRARY) INSTDIR=$(PWD)/linux64 diff --git a/Makefile.mac b/Makefile.mac new file mode 100644 index 0000000..c06b3cf --- /dev/null +++ b/Makefile.mac @@ -0,0 +1,15 @@ +include Makefile + +CC=clang++ + +LIBRARY=$(LIBNAME).dylib.$(LIBVERSION) + +COPTS=-fPIC -O2 -m64 -Wall -stdlib=libc++ -std=c++11 +LDOPTS=-dynamiclib -Wl,-install_name,@rpath/$(LIBRARY) +INSTDIR=$(PWD)/mac + +clean:: + $(RM) $(OBJS) $(LIBRARY) *~ + +install:: + $(RM) $(INSTDIR)/lib/$(LIBNAME).so && $(LN) $(LIBRARY) $(INSTDIR)/lib/$(LIBNAME).dylib diff --git a/Makefile.win32 b/Makefile.win32 index 6ef3557..cd0593c 100644 --- a/Makefile.win32 +++ b/Makefile.win32 @@ -11,7 +11,7 @@ LIBRARY=$(LIBNAME).dll INSTDIR=$(PWD)/win32 -all: $(LIBRARY) +all: $(HEADERS) $(LIBRARY) %.o: %.cpp $(CC) -c $(COPTS) $< -Fo$@ @@ -26,6 +26,6 @@ $(LIBRARY): $(OBJS) install:: $(RM) $(INSTDIR)/lib/$(LIBNAME).so $(CP) $(LIBRARY:%.dll=%.lib) $(INSTDIR)/lib - + $(CP) $(HEADERS) $(INSTDIR)/include/csm clean:: $(RM) $(LIBRARY).manifest $(LIBRARY:%.dll=%.ldf) $(LIBRARY:%.dll=%.lib) $(LIBRARY:%.dll=%.exp)