From dd2ad03893dcd6ca9da549577aee5c0bc6f54d4b Mon Sep 17 00:00:00 2001 From: NicJA Date: Fri, 4 May 2018 08:11:06 +0000 Subject: [PATCH] build infplane for all targets .. only use the asm where supported. git-svn-id: https://svn.aros.org/svn/aros/trunk/contrib@55156 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- Demo/InfPlane/infplane.c | 11 +++++----- Demo/InfPlane/mmakefile.src | 52 ++++++++++++++++++++++----------------------- 2 files changed, 31 insertions(+), 32 deletions(-) rewrite Demo/InfPlane/mmakefile.src (62%) diff --git a/Demo/InfPlane/infplane.c b/Demo/InfPlane/infplane.c index eac5bb87b..6660dafe8 100644 --- a/Demo/InfPlane/infplane.c +++ b/Demo/InfPlane/infplane.c @@ -16,7 +16,6 @@ #include #include - /***********************************************************************************/ struct IntuitionBase *IntuitionBase; @@ -37,9 +36,6 @@ static void cleanup(char *msg); /***********************************************************************************/ -#define C_FUNCTION -/* comment/undefine this define to use the asm routine */ - #define W 320 #define H 240 @@ -47,7 +43,6 @@ static void cleanup(char *msg); #define M_PI 3.14159265358979323846 /* pi */ #endif - #define RADIUS 64 #define DIST 256 @@ -57,8 +52,11 @@ void do_precalc(float Hp2, /* altitude du 2eme plan (1er = 0 float vx1, float vy1, float vz1, /* vecteur selon X ecran */ float vx2, float vy2, float vz2 /* vecteur selon Y ecran */ ); +#ifdef C_FUNCTION void refresh1 (); +#else extern void refresh_prout(); /* eh eh */ +#endif float alpha [H/8+1][W/8+1] ; float zede [H/8+1][W/8+1] ; @@ -256,7 +254,7 @@ void do_precalc(float Hp2, } - +#ifdef C_FUNCTION void refresh1 () { int i,j; /* macro-bloc */ int ii,jj; /* dans bloc (interpolation) */ @@ -352,6 +350,7 @@ void refresh1 () { } } +#endif /***********************************************************************************/ diff --git a/Demo/InfPlane/mmakefile.src b/Demo/InfPlane/mmakefile.src dissimilarity index 62% index 2ee801cdc..c213973c0 100644 --- a/Demo/InfPlane/mmakefile.src +++ b/Demo/InfPlane/mmakefile.src @@ -1,26 +1,26 @@ - -include $(SRCDIR)/config/aros-contrib.cfg - -#MM- demo-infplane : demo-infplane-$(AROS_TARGET_CPU) - -#MM demo-infplane-i386 : demo-infplane-common - -#MM demo-infplane-x86_64 : demo-infplane-common - -#MM- demo-infplane-common : demo-infplane-icons demo-infplane-data - -DESTDIR := $(AROS_CONTRIB)/Demos/InfPlane - -%build_prog mmake=demo-infplane-i386 \ - progname=InfPlane targetdir=$(DESTDIR) \ - files=infplane asmfiles=refresh-i386 - -%build_prog mmake=demo-infplane-x86_64 \ - progname=InfPlane targetdir=$(DESTDIR) \ - files=infplane asmfiles=refresh-x86_64 - -DATAFILES := pattern.data pattern.pal - -%copy_files_q mmake=demo-infplane-data files=$(DATAFILES) dst=$(DESTDIR) - -%common + +include $(SRCDIR)/config/aros-contrib.cfg + +#MM- demo-infplane : demo-infplane-binary demo-infplane-icons demo-infplane-data + +DESTDIR := $(AROS_CONTRIB)/Demos/InfPlane + +ifneq (,$(findstring x86_64,$(AROS_TARGET_CPU))) +INFPLANE_ASM += refresh-i386 +else +ifneq (,$(findstring i386,$(AROS_TARGET_CPU))) +INFPLANE_ASM += refresh-i386 +else +USER_CFLAGS += -DC_FUNCTION +endif +endif + +%build_prog mmake=demo-infplane-binary \ + progname=InfPlane targetdir=$(DESTDIR) \ + files=infplane asmfiles=$(INFPLANE_ASM) + +DATAFILES := pattern.data pattern.pal + +%copy_files_q mmake=demo-infplane-data files=$(DATAFILES) dst=$(DESTDIR) + +%common -- 2.11.4.GIT