Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these changes are necessary. $@ should be the same as $(LIBRARY)


all: $(HEADERS) $(LIBRARY)

Expand Down
5 changes: 3 additions & 2 deletions Makefile.linux64
Original file line number Diff line number Diff line change
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be anything in this library that requires C++11 support

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c++11 is now required by MSP, and some new features we are looking to add (supporting multiple correlation functions) want to utilized std::shared_ptr, so this will be necessary going forward.

LDOPTS=-shared -Wl,-install_name,$(LIBRARY)
INSTDIR=$(PWD)/linux64
15 changes: 15 additions & 0 deletions Makefile.mac
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LIBRARY=$(LIBNAME).dll

INSTDIR=$(PWD)/win32

all: $(LIBRARY)
all: $(HEADERS) $(LIBRARY)

%.o: %.cpp
$(CC) -c $(COPTS) $< -Fo$@
Expand All @@ -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)