Skip to content

Commit

Permalink
irteus: cleanup Makfile, check if JPEG/PQP installed
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed May 1, 2022
1 parent 7b19e3b commit d4fd485
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 10 deletions.
25 changes: 20 additions & 5 deletions irteus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
### ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###

include ./Makefile.$(ARCHDIR)

# directory where this package install object file to
IRTEUSDIR=$(EUSDIR)
INSTALLBINDIR=$(IRTEUSDIR)/$(ARCHDIR)/bin
Expand All @@ -69,6 +67,14 @@ else
endif
$(info "-- HAVE_PQP = ${HAVE_PQP}")


HAVE_JPEG=$(shell echo "\#include <stdio.h>\n\#include \"jpeglib.h\"\n\#include \"jconfig.h\"\n" > test-jpeg.c; $(CC) -c test-jpeg.c > /dev/null 2>&1 && echo 1 || echo 0)
$(info "-- HAVE_JPEG = ${HAVE_JPEG}")
HAVE_PNG=$(shell echo "\#include <png.h>\nint main(){png_create_read_struct(PNG_LIBPNG_VER_STRING,NULL,NULL,NULL);;}\n" > test-png.c; $(CC) test-png.c -lpng > /dev/null 2>&1 && echo 1 || echo 0)
$(info "-- HAVE_PNG = ${HAVE_PNG}")

include ./Makefile.$(ARCHDIR)

# common
WFLAGS= #-Wall

Expand All @@ -94,7 +100,14 @@ EUSLIB_MODULES.L=$(addprefix $(EUSDIR)/lib/,$(MODULES.L))
IRTEUS=irtmath irtutil irtgraph gnuplotlib pgsql time
IRTEUSG=irtgeo pqp bullet irtcollision irtscene irtmodel irtsensor irtdyna irtrobot irtbvh irtcollada irtpointcloud irtstl irtwrl
IRTEUSX=irtx
IRTEUSIMG=irtimage eusjpeg png
IRTEUSIMG=irtimage
ifeq ($(HAVE_JPEG), 1)
IRTEUSIMG+=eusjpeg
JPEGMEMCD=$(INSTALLLIBDIR)/jpegmemcd.$(LSFX)
endif
ifeq ($(HAVE_PNG), 1)
IRTEUSIMG+=png
endif
IRTEUSGL=irtgl irtglrgb irtviewer
NR=nr

Expand Down Expand Up @@ -149,7 +162,9 @@ IRTEUSGL_L=$(addsuffix .l,$(IRTEUSGL))

IRTCOBJECTS=$(INSTALLOBJDIR)/irtc.$(OSFX) $(INSTALLOBJDIR)/irtgeoc.$(OSFX)
IRTGCOBJECTS=$(INSTALLOBJDIR)/CPQP.$(OSFX) $(INSTALLOBJDIR)/euspqp.$(OSFX) $(INSTALLOBJDIR)/CBULLET.$(OSFX) $(INSTALLOBJDIR)/eusbullet.$(OSFX)
IRTIMGCOBJECTS=$(INSTALLOBJDIR)/euspng.$(OSFX)
ifeq ($(HAVE_PNG), 1)
IRTIMGCOBJECTS=$(INSTALLOBJDIR)/euspng.$(OSFX)
endif
IRTGLCOBJECTS=$(INSTALLOBJDIR)/irtglc.$(OSFX)
NROBJECTS=$(INSTALLOBJDIR)/nr.$(OSFX)

Expand Down Expand Up @@ -177,7 +192,7 @@ $(LIBIRTEUSG): $(IRTEUSGOBJS) $(IRTGCOBJECTS) $(LIBNR) $(PQPLIBSTATIC)
$(LIBIRTEUSX): $(IRTEUSXOBJS) $(LIBNR)
$(CXX) $(SOFLAGS) $(OUTOPT)$(LIBIRTEUSX) $(IRTEUSXOBJS) $(IMPLIB)

$(LIBIRTEUSIMG): $(INSTALLLIBDIR)/jpegmemcd.$(LSFX) $(IRTEUSIMGOBJS) $(IRTIMGCOBJECTS) $(LIBNR)
$(LIBIRTEUSIMG): $(JPEGMEMCD) $(IRTEUSIMGOBJS) $(IRTIMGCOBJECTS) $(LIBNR)
$(CXX) $(SOFLAGS) $(OUTOPT)$(LIBIRTEUSIMG) $(IRTEUSIMGOBJS) $(IRTIMGCOBJECTS) $(IMPLIB) $(IMPLIBIMG)

$(LIBIRTEUSGL): $(IRTEUSGLOBJS) $(IRTGLCOBJECTS) $(LIBNR)
Expand Down
7 changes: 6 additions & 1 deletion irteus/Makefile.Cygwin
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ ESFX=.exe
SOFLAGS=-shared -g -falign-functions=4 -Wl,--export-all-symbols
IMPLIB=$(EUSDIR)/$(ARCH)/bin/eusgl.a $(EUSDIR)/$(ARCH)/lib/libnr.$(LSFX)
IMPLIBGL=$(EUSDIR)/$(ARCH)/bin/eusgl.a -L/usr/X11R6/lib -lGLU -lGL -lXext
IMPLIBIMG=-ljpeg -lpng
ifeq ($(HAVE_JPEG), 1)
IMPLIBIMG+=-ljpeg
endif
ifeq ($(HAVE_PNG), 1)
IMPLIBIMG+=-lpng
endif
EXPLIB=
RAPID=-LRAPID/$(ARCHDIR) -lRAPID-static
RAPIDLIB=RAPID/$(ARCHDIR)/$(LPFX)RAPID-static.a
Expand Down
7 changes: 6 additions & 1 deletion irteus/Makefile.Darwin
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ ESFX=
SOFLAGS=-dynamiclib -flat_namespace -undefined suppress -g -falign-functions=8
IMPLIB=-L$(EUSDIR)/$(ARCHDIR)/lib -leusgeo -L$(INSTALLLIBDIR) -lnr
IMPLIBGL=-L$(EUSDIR)/$(ARCHDIR)/lib -leusgl -L/usr/X11R6/lib -lGLU -lGL -lXext
IMPLIBIMG=-L/opt/local/lib/jpeg6b/lib -ljpeg -L/opt/local/lib -lpng
ifeq ($(HAVE_JPEG), 1)
IMPLIBIMG+=-L/opt/local/lib/jpeg6b/lib -ljpeg
endif
ifeq ($(HAVE_PNG), 1)
IMPLIBIMG+=-L/opt/local/lib -lpng
endif
EXPLIB=
RAPID=-LRAPID/$(ARCHDIR) -lRAPID-static
RAPIDLIB=RAPID/$(ARCHDIR)/$(LPFX)RAPID-static.a
Expand Down
7 changes: 6 additions & 1 deletion irteus/Makefile.Linux
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ ESFX=
SOFLAGS=-shared -g -falign-functions=4 -Xlinker --unresolved-symbols=ignore-all
IMPLIB=-L$(EUSDIR)/$(ARCH)/lib -leusgeo -L$(INSTALLLIBDIR) -lnr
IMPLIBGL=-L$(EUSDIR)/$(ARCH)/lib -leusgl -L/usr/X11R6/lib -lGLU -lGL -lXext
IMPLIBIMG=-ljpeg -lpng
ifeq ($(HAVE_JPEG), 1)
IMPLIBIMG+=-ljpeg
endif
ifeq ($(HAVE_PNG), 1)
IMPLIBIMG+=-lpng
endif
EXPLIB=
RAPID=-LRAPID/$(ARCHDIR) -lRAPID-static
RAPIDLIB=RAPID/$(ARCHDIR)/$(LPFX)RAPID-static.a
Expand Down
7 changes: 6 additions & 1 deletion irteus/Makefile.Linux64
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ ESFX=
SOFLAGS=-shared -g -falign-functions=8 -Xlinker --unresolved-symbols=ignore-all
IMPLIB=-L$(EUSDIR)/$(ARCHDIR)/lib -leusgeo -L$(INSTALLLIBDIR) -lnr
IMPLIBGL=-L$(EUSDIR)/$(ARCHDIR)/lib -leusgl -L/usr/X11R6/lib -lGLU -lGL -lXext
IMPLIBIMG=-ljpeg -lpng
ifeq ($(HAVE_JPEG), 1)
IMPLIBIMG+=-ljpeg
endif
ifeq ($(HAVE_PNG), 1)
IMPLIBIMG+=-lpng
endif
EXPLIB=
RAPID=-LRAPID/$(ARCHDIR) -lRAPID-static
RAPIDLIB=RAPID/$(ARCHDIR)/$(LPFX)RAPID-static.a
Expand Down
7 changes: 6 additions & 1 deletion irteus/Makefile.LinuxARM
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ ESFX=
SOFLAGS=-shared -g -falign-functions=4 -Xlinker --unresolved-symbols=ignore-all
IMPLIB=-L$(EUSDIR)/$(ARCH)/lib -leusgeo -L$(INSTALLLIBDIR) -lnr
IMPLIBGL=-L$(EUSDIR)/$(ARCH)/lib -leusgl -L/usr/X11R6/lib -lGLU -lGL -lXext
IMPLIBIMG=-ljpeg -lpng
ifeq ($(HAVE_JPEG), 1)
IMPLIBIMG+=-ljpeg
endif
ifeq ($(HAVE_PNG), 1)
IMPLIBIMG+=-lpng
endif
EXPLIB=
RAPID=-LRAPID/$(ARCHDIR) -lRAPID-static
RAPIDLIB=RAPID/$(ARCHDIR)/$(LPFX)RAPID-static.a
Expand Down

0 comments on commit d4fd485

Please sign in to comment.