GLF source tree organization and naming conventions 3/18/2018 GLF ---------------------------------------------------------------------------------------------------- Programmers have many different preferences for organizing their source code and build folders for projects. The GLF Programming Environment (GLFPE) reflects the preferences and history of its author (GLF) and the initial installation of the GLFPE source tree will set the same patterns for project organization. The user is free to reorganize, but that will impact the specifics of project files (*.dev and/or makefiles) and the user would need to edit accordingly. Historically, GLF has stored all working code under the folder "prg". The folder then is subdivided by OS target, such as "prg\win" or "prg\dos". The next folder level is for the intended compiler, such that all source code which requires a particular IDE or compiler is located together under a common root, such as "prg\dos\tc", "prg\win\gfortran" or "prg\win\orw630" (for code compiled with Orwell Dev-C++ and gcc 6.3.0). In general, though not in all cases, individual projects are organized into individual folders located underneath a "theme" folder (e.g. astro or colutils). Each project folder contains a project file, source code and compiled executable for that project. Most open source or public domain external libraries are assumed to be installed to the same bin, lib, and include folders as the MinGW32 compiler. GLF local library source, lib and include (*.a and *.h) files are mainly found in the "clibrary" folder. It is usually assumed in the project files that "clibrary" is located two levels up in the tree, that is, "..\..\clibrary" will be valid, and that *.a and *.h are in the same root level of the "clibrary" folder. The source code is organized by projects compilable individually within the Orwell Dev-C++ IDE, the IDE historically chosen by the author (GLF). The project configurations are set in *.dev project files, which are processed at "Build All" time into autogenerated makefiles, which in turn are built into executable libraries or applications (currently using MinGW32 GCC 6.3.0 mingw32-make). Orwell Dev-C++ is relatively simple yet capable enough, freely available, and has the decided advantage that its project files are plaintext, easily editable with any ASCII text editor or by custom conversion programs (techniques frequently used by GLF). Dev-C++ is not particularly popular or widely used. However, Code::Blocks, a more popular IDE has provisions for direct import and conversion of Dev-C++ projects, and if a user prefers that IDE, the availability of conversion is valuable. GLF has personally written conversion utilities to help translate to yet another IDE (V IDE), which is primarily useful to assist porting GLF code to Linux. Assuming the Orwell Dev-C++ IDE has been formally installed and typical file extensions are enabled, ordinarily a user would only need to locate the project folder of interest, double-click the *.dev (project) file, edit the code as desired, then click "Execute", "Rebuild All" to compile and link the project into a library or executable. If the user is changing a "clibrary" module, the compiled library and needed &*.h files would also be copied up one folder level to the "clibrary" root so they can be seen by other projects. Alternatively, for most of the GLF projects included in the source tree, the makefiles (Makefile.win) generated by Orwell (or prior versions of Dev-C++) have been manually copied and renamed in the style of "projectname.mkw" (suggesting "projectname, make in Windows"). There are several hundred such GLF projects with corresponding *.mkw files, and GLF has prepared autobuild scripts which can recompile all such prepared projects by invoking 'mingw-make" in console mode on such makefiles. These autobuild scripts are convenient and essential for testing the entire suite of sample source projects quickly while logging the results to easily determine problems needing resolution. The autobuild scripts are located under the \prg\win\orw630\autobuild folder (see tree below). How tree is structured and named ---------------------------------- The tree under "prg" is organized by target os (e.g. win), and under that by compiler required for the code in that source subtree (e.g. orw630 = Orwell Dev-C++ with GCC 6.3.0). If a new compiler is adopted for the same source code, the tree is copied or renamed to reflect the new compiler version. These trees for different compiler versions are kept separate from prior versions so that the binaries and their library dependencies are internally and externally consistent (hence there are trees "orw462", "orw481", "orw630", etc.). Code ported to other OS platforms is kept similarly segregated by naming convention. The source files may be almost all identical across such named subtrees, but the object files and executables will all be different and assumed incompatible. Sometimes the binary incompatibilities are fundamental and profound (different OSes) and sometimes they look almost identical but may have incompatible ABIs (application binary interface) protocols underneath (due to GCC compiler design changes), rendering them effectively incompatible. Underneath the OS and compiler organization, the source tree breaks down with major interest categories, then by application project name (e.g. \prg\win\orw630\gmptest\pidigs). The names of projects are sometimes modified to flag them as different from the normal list of (asumed buildable and working) project names. Folders prepended with an underscore ("_") are intended by GLF to be assumed unfinished, incomplete, erroneous in some way, or irrelevant to the OS context. An example of the latter would be _xwinbgi3 under Windows, since it requires X and Linux. Such code may be fully valid and waiting to be ported to another OS, or work in progress code that isn't ready. The underscore helps to sort folders needing attention to one end or the other of a file list in Explorer, so it is more obvious which need work. NOTE: The location of GLF local library files (*.a) and headers (*.h) under "clibrary" is organized relative to the location of application projects such that a library path reference using ../../clibrary will locate a GLF local library from (almost) all the projects. For example, the project file for "sid_clk" is: orw630\astro\sid_clk\32sid_clk.dev It requires libraries (among others): orw630\clibrary\gflib.a orw630\clibrary\sidtime.a orw630\clibrary\lconio.a A relative reference from the folder in which 32sid_clk.dev is located will see those libraries as: ..\..\clibrary\gflib.a ..\..\clibrary\sidtime.a ..\..\clibrary\lconio.a As of 18 Mar 2018, the current GLF open source C/C++ tree (orw630 = Orwell with gcc 6.3.0), selected folders: prg win orw630 astro domerun5 domerun6 dometest emuddw7 sid_clk sspbug3 sspbug31 _dome_docs autobuild 1_START_HERE_Create_RAW_batch_from_directory_scans 2_IF_NEEDED_AutoIt_rebuild_all_projects_from_dev_files_and_create_mkw_files 3_Rebuild_all_from_existing_mkw_makefiles 4_AutoIt_import_all_projects_from_dev_files_to Codeblocks 5_Rebuild_all_codeblock_projects_from_cbp_files 6_Linux_script_to_autorun_VIDE_on_equivalent_ported_projects progs business amort amort2 glfbudg glfbudgf clibrary 01_obsolete 02_updated 03_osdep 04_mingfix 05_kbhit 06_gflib 07_lconio 08_sidtime 09_geolib 10_wavesprt 11_gftermio 12_stdprn 13_calensub 14_extract 15_matrix 16_matrix3d 17_searches 18_scandir 19_xwinlite 20_winbgi3 _20_xwinbgi3 21_portio 22_vidmgr 23_vioimage 24_csockets 25_pnggfx 26_cgraphps 27_sqlite3 28_shapelib colutils binctcol chgtabs chopline csvprexb decpp dos2lin findcol fixasc fixblank fixcrlf fixendf fixlead fixtabs getmags indxline lin2dos lowcase ncolumns nodashes numlines pcolumns pickcol pullbcol pullcchg pullclst pullcol pullifc pullstr purgbcol purgclst purgecol purgestr purgifc rd1line replcol replstr rightjus sortcol sortline split splitaud teststats text2csv uniqcol xreportr xtemplat xtrgdvin _teststats OK good algorithm convert cvtcp437 cvtobjsc dbxlate legohtm legolist legos pes pickwd pruneobj psmbevel pulleft sliceobj slim95 _cvjpg1 _cvpgm2gf _legolist _pgm2pgm __cvjpg1 __pgm2pgm cprog balloons balloonz bcmark cheksq countwrd cvtdev2t cvtdev2v cvtdev2x cvtdevm cvtdevm2 cvtdevw3 cvtdevwx cvtdv3w2 docudev docudevh dumpfile forensic houroday md5test note numwords parsepcl parsepcl0 pcspeed phochart pngtest qtrclndr randseq rdpno renimgfiles scorewdm scorewf scorewrd statruth testcbug testmem timelog workload xlc64 _balloons _cheksq _parsepcl0 _pngtest cprog2 dictlkp dictpik dict_h2 intertry knowjack pistats statmach _dict dirs cbgcompd cbpcompd copyfind cpytrdocs cpytrexe cpytrprj cpytrsrc cpy_tree cvttrdv2 cvttrmks devcompd devvpjcd diragem dirages dirsonly dirtrdat dirtree dirtrexe dir_mdev dxgdate emtouch foldertr imgdate impcompd lega_c mergepdf mkwcompd olddirs renframes rentree rplstr runallex scandemo scanstat scantest sizetree tidydir touchold vmkcompd dummy do_nada edas edas2esc esctmpfs lookedas _TEST edit vued ellipse elliptc5 elliptc6 games dosudoku geo cvtutm2 geostr utmc1866 utmtest1 _geosolve _llutm glpktest examples gmptest bmult nfact pi pidigs graphics bgidemo neighbor pngtohpgl pngtohpglmono pngtohpglvector ppattern xkbd _testxwinlite gsltest examples _tests gz zlibtest hivol calmot calmot2 calor hivol orifi io iobox test1 test2 keyboard keystuff keystuff2 keystuff4 keystuff6 keystuff_wx _keystuff2 _keystuff4 _keystuff6 _keystuff_wx linuxut prepexec lvl1 balmodel balscrip balsize2 betabrit bigbrite ccpkt4 cvtusbee dumpasn1 frankenplot geoscrip glfvending1 gpssim hpglarc joysolve plotsolve processmask sercapture1 sercapture2 testcomm testcsum testser _ccpkt4 _cvtusbee m6supprt cvtm5to6 cvtm6ef ssweight tb1tocsv tbweight xtractiv _M6supprt_test mapping matchmap plbmp4 plbmp42 plbmp42h pl_bmp3 pl_bmp31 segments _addcpltb _obsolete math addup addupr areapoly areapoly_orig clinreg coneline geomean geomlibt geomlibt0 goertz_1 goertz_2 goertz_9 goertz_dtmf5 hpglarc joysolve linreg optable pi plotsolve pointplane polyarea solve3 trymat3d trymatrx weighavg _areapoly_orig _hold_wip opencv_tutorial 01_introduction 01_common 01_DisplayImage 02_LoadModifySave 02_opencv_gcc_cmake 01_DisplayImage 03_opencv_gcc_vide 01_DisplayImage 02_core 01_mat_the_basic_image_container 02_how_to_scan_images 03_mat_mask_operations 04_blending 05_contrast_brightness 06_Basic_drawing 07_random_gen_and_text 08_discrete_fourier_transform 09_file_input_output 10_interoperability_with_OpenCV_1 03_ImgProc 01_smoothing 02_erode_dilate 03_morphology 04_image_pyramids 05_thresholding 06_make_filters 07_borders 08_Sobel_derivatives 09_Laplace 10_canny 11_Hough_line 12_Hough_circle 13_remapping 14_affine 15_Histogram_eq 16_Histogram_calc 17_Histogram_comp 18_back_projection 19_template_matching 20_contours 21_convex_hull 22_bound_box 23_rotate_bound_box 24_image_moments 25_point_polygon 04_HighGUI 01_add_trackbar 02_video-input-psnr-ssim 03_video-write video 05_calib3d 01_camera_calibration 02_stereoBM 06_features2D 01_Harris_corners 02_Shi_Tomasi 03_create_corner_detect 04_subpixels 05_feature_description 06_feature_detect 07_features_flann 08_homography 07_objectDetection 08_ml 01_introduction_to_svm 02_non_linear_svms 09_gpu 01_gpu-basics-similarity 10_contrib 01_retina 11_iOS 12_viz 01_launch_Viz 02_pose_widget 03_transformations 04_create_widgets images pdcurs34 demos png dxgconvert makepng1 processmask special testdxgconvert testpnggfx xstitchpng _dxgconvert (4th copy) _pes pw printpw _printpw _pwlib registry regpull rtf rtfmerge security logwatch spoj onb palinprime prime1 test sqlite3 demo term frankenplot testc testd testgft6 _frankenplot (copy) _frankenplot_log _frankenplot_stable _testc _testd test hellow qmenu _qmenu testlibs bgi3 bgi3demo calensub cgraphps curses geolib gflib gftermio GL_bounce GL_geartrain GL_morph3d gmp kbhit mat2 matrix matrix3d portio scandir sidtime sqlite3 testjpeg testpnggfx testpnggfx_old wavesprt win_allegro win_fltk win_SDL win_wxWidgets zlibtest _testxwinlite threads tryntthread trypthread _tryntthread __tryntthread tiger tg1scan tg2scan tgpscan _test timecalc timecalc tstcgrph dash loglog marker minimal vetaffi affivert affprint _test wavfiles lasergen wav16to8 wav8to16 wavaddhd wavapp wavdelhd wavflow wavgen wavgendtmf wavpitch wavvol win_alleg_work allegrotest atest1 os test breezenote01 backups breezenote0s os test breezenote02 breezenote03 cputest filetest guiplay helloworld stereodisp tinyseq tinyseqplus01 trysmaller _allegrotest _helloworld win_fltk aboutglfpe cubeviewfast hello1 hello1 - Copy _cubeviewtest win_GL demos glutdemo fontdemo fractals fractals_random lorenz shapes redbook samples win_sdl_test PlaySound testdraw testtimer ttftest _playsound2 _sdl_buildtests _source_tests win_wx about anitest arttest aui calendar caret checklst collpane combo conftest console controls dataview dialogs display dnd docview docvwmdi dragimag drawing dynamic erase event except exec font grid help helpview hhelp hprinting htlbox image internat ipcclient ipcserver joytest keyboard lboxtest listtest mdi mediaplayer menu minifram minimal multimon nativdlg notebook oleauto ownerdrw pngdemo popup printing propsize regtest render richtext rotate sashtest scroll scrollsub shaped socketclient socketserver sound splash splitter statbar tbtest test text thread toolbar treectrl typetest validate virtual vscroll widget widgets wizard zip _accesstest _cube _dataview _display _htmlctrl _isosurf _layout _mediaplayer _nativdlg _oleauto _penguin