From: curt Date: Wed, 22 Apr 1998 13:24:04 +0000 (+0000) Subject: C++ - ifiing the code a bit. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=73ed3c180edbb2e65e76342faa2f30aff5ed1186;p=flightgear.git C++ - ifiing the code a bit. Starting to reorginize some of the lighting calcs to use a table lookup. --- diff --git a/Time/Makefile.am b/Time/Makefile.am index e2ab01cc8..11a9e2976 100644 --- a/Time/Makefile.am +++ b/Time/Makefile.am @@ -6,6 +6,7 @@ libTime_la_SOURCES = \ event.c event.h \ fg_time.c fg_time.h \ fg_timer.c fg_timer.h \ - sunpos.c sunpos.h + light.cxx light.hxx \ + sunpos.cxx sunpos.hxx INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator diff --git a/Time/Makefile.in b/Time/Makefile.in index c7a427186..1ae8bef1d 100644 --- a/Time/Makefile.in +++ b/Time/Makefile.in @@ -78,7 +78,8 @@ libTime_la_SOURCES = \ event.c event.h \ fg_time.c fg_time.h \ fg_timer.c fg_timer.h \ - sunpos.c sunpos.h + light.cxx light.hxx \ + sunpos.cxx sunpos.hxx mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../Include/config.h CONFIG_CLEAN_FILES = @@ -95,7 +96,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ libTime_la_LDFLAGS = libTime_la_LIBADD = -libTime_la_OBJECTS = event.lo fg_time.lo fg_timer.lo sunpos.lo +libTime_la_OBJECTS = event.lo fg_time.lo fg_timer.lo light.lo sunpos.lo +CXXFLAGS = @CXXFLAGS@ +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) +CXXLINK = $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @@ -108,14 +113,15 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP = --best DEP_FILES = .deps/event.P .deps/fg_time.P .deps/fg_timer.P \ -.deps/sunpos.P +.deps/light.P .deps/sunpos.P +CXXMKDEP = $(CXX) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) SOURCES = $(libTime_la_SOURCES) OBJECTS = $(libTime_la_OBJECTS) all: Makefile $(LTLIBRARIES) .SUFFIXES: -.SUFFIXES: .S .c .lo .o .s +.SUFFIXES: .S .c .cxx .lo .o .s $(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu Simulator/Time/Makefile @@ -182,7 +188,11 @@ distclean-libtool: maintainer-clean-libtool: libTime.la: $(libTime_la_OBJECTS) $(libTime_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libTime_la_LDFLAGS) $(libTime_la_OBJECTS) $(libTime_la_LIBADD) $(LIBS) + $(CXXLINK) -rpath $(libdir) $(libTime_la_LDFLAGS) $(libTime_la_OBJECTS) $(libTime_la_LIBADD) $(LIBS) +.cxx.o: + $(CXXCOMPILE) -c $< +.cxx.lo: + $(LTCXXCOMPILE) -c $< tags: TAGS @@ -249,6 +259,17 @@ maintainer-clean-depend: @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \ < .deps/$(*F).p > .deps/$(*F).P @-rm -f .deps/$(*F).p + +%.o: %.cxx + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).P -c $< + +%.lo: %.cxx + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).p -c $< + @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \ + < .deps/$(*F).p > .deps/$(*F).P + @-rm -f .deps/$(*F).p info: dvi: check: all diff --git a/Time/fg_time.c b/Time/fg_time.c index fdc510df9..e4e186867 100644 --- a/Time/fg_time.c +++ b/Time/fg_time.c @@ -44,14 +44,15 @@ #include #include #include -#include