Started a rewrite of the makefile generator.

Probably not worth it, let's be honest...
This commit is contained in:
InvisibleUp 2019-07-27 14:58:45 -04:00
parent 48676c4abf
commit a8e9bc990e
38 changed files with 130 additions and 78 deletions

View File

@ -17,6 +17,8 @@
BuiLD system UTILities part 3
*/
#include "COREDEFS.h"
#define src_d_name "src"
#define cfg_d_name "cfg"

View File

@ -17,6 +17,9 @@
BuiLD system UTILities part 4
*/
#include "COREDEFS.h"
#include "CNFGDLFT.h"
LOCALPROC WriteOutDummyContents(void)
{
WriteDestFileLn(

View File

@ -1,10 +0,0 @@
/*
CONFIGUR.i
*/
/*
CONFIGURation file
see CNFGDLFT.i and CNFGOPTS.i for things
that can go here.
*/

View File

@ -1,5 +1,5 @@
/*
COREDEFS.i
COREDEFS.h
Copyright (C) 2018 Paul C. Pratt
You can redistribute this file and/or modify it under the terms
@ -17,6 +17,8 @@
CORE DEFinitionS
*/
#ifndef _COREDEFS_H
#define _COREDEFS_H
typedef unsigned long ui5b;
typedef unsigned short ui4b;
@ -88,3 +90,5 @@ typedef MyByte *MyPtr;
#define EXPORTVAR static
GLOBALVAR MyPtr pDt;
#endif

View File

@ -17,6 +17,8 @@
GeNeric BuiLD OPTions
*/
#include "COREDEFS.h"
/* --- default definitions for SPBASDEF --- */
#ifndef MayUseSound

View File

@ -17,6 +17,8 @@
program SPecific BuiLD OPTions
*/
#include "COREDEFS.h"
/* option: model */
enum {

View File

@ -20,6 +20,8 @@
only by platform specific code)
*/
#include "COREDEFS.h"
LOCALPROC WriteAppSpecificCNFGRAPIoptions(void)
{

View File

@ -17,6 +17,8 @@
program SPecific CoNFiGuration GLobals
*/
#include "COREDEFS.h"
LOCALPROC WriteAppSpecificCNFGGLOBoptions(void)
{
WriteBlankLineToDestFile();

View File

@ -17,7 +17,7 @@
program SPecific FILe DEFinitions
*/
#include "COREDEFS.h"
/* --- list of source files --- */

View File

@ -17,6 +17,8 @@
program SPecific write OTHer ConFiguration files
*/
#include "COREDEFS.h"
LOCALPROC WriteAppCNFGGLOBContents(void)
{
WriteCommonCNFGGLOBContents();

View File

@ -17,6 +17,8 @@
USe program SPecific FILe DEFinitions
*/
#include "COREDEFS.h"
LOCALPROC NullProc(void)
{
}

View File

@ -17,6 +17,8 @@
WRite "CNFGrAPi.h"
*/
#include "COREDEFS.h"
LOCALPROC WriteOSXLocalTalkCNFGRAPI(void)
{
WriteDestFileLn("#include <unistd.h>");

View File

@ -17,6 +17,8 @@
WRite "CNFGGLob.h"
*/
#include "COREDEFS.h"
LOCALPROC WriteConfigurationWarning(void)
{

View File

@ -17,6 +17,8 @@
WRite MACintosh RESources configuration
*/
#include "COREDEFS.h"
LOCALPROC WriteBeginResResource(char *types, int id)
{

View File

@ -17,6 +17,7 @@
WRite Macintosh PLIST
*/
#include "COREDEFS.h"
enum {
kPListRaw, /* native plist data */

View File

@ -17,6 +17,7 @@
WRite TEXT FiLe
*/
#include "COREDEFS.h"
/* --- routines for writing text files --- */

8
setup/config.h Normal file
View File

@ -0,0 +1,8 @@
/*
Configuration file
Insert overrides for defaults.h and options.h here
*/
#include "config/defaults.h"
#include "config/options.h"

View File

@ -1,5 +1,5 @@
/*
CNFGDLFT.i
defaults.h
Copyright (C) 2018 Paul C. Pratt
You can redistribute this file and/or modify it under the terms
@ -16,7 +16,7 @@
/*
CoNFiGuration DeFauLTs
set default values for things not set in CONFIGUR.i
set default values for things not set in config.h
*/
@ -32,6 +32,8 @@
#ifndef cur_ide
/* Automatic IDE selection */
/* TODO: Fill out and/or remove other compilers */
#ifdef applec
#define cur_ide gbk_ide_mpw
#else
@ -40,7 +42,8 @@
#endif /* cur_ide */
/* Determine the IDE version, if applicable */
/* TODO: Fill out and/or remove other compilers */
#ifndef ide_vers
#if gbk_ide_xcd == cur_ide
@ -53,12 +56,14 @@
#endif /* ide_vers */
/* Use command line for ??? */
#ifndef UseCmndLine
#define UseCmndLine 0
#endif
/* Check if we're on classic Mac OS, which can only store executables in */
/* 32-kilobyte segments */
#ifndef NeedSegmenting
#if gbk_ide_mpw == cur_ide
@ -70,6 +75,7 @@
#endif /* NeedSegmenting */
/* Automatically determine makefile output format */
#ifndef gbo_script
#if gbk_ide_mpw == cur_ide

View File

@ -1,5 +1,5 @@
/*
CNFGOPTS.i
options.h
Copyright (C) 2018 Paul C. Pratt
You can redistribute this file and/or modify it under the terms
@ -14,14 +14,13 @@
*/
/*
CoNFiGuration OPTionS
Configuration Options
choices that can be used in CONFIGUR.i
choices that can be used in config.h
*/
/* choices for cur_ide */
#define gbk_ide_mpw 1 /* Macintosh Programmers Workshop */
#define gbk_ide_mw8 2 /* Metrowerks CodeWarrior */
#define gbk_ide_bgc 3 /* Gnu tools */
@ -40,7 +39,6 @@
#define gbk_ide_mvc 15 /* Mini vMac C (a specific version of gcc) */
/* choices for gbo_script */
#define gbk_script_mpw 1
#define gbk_script_applescript 2
#define gbk_script_bash 3

View File

@ -17,6 +17,8 @@
WRite Bash Gnu C specific FiLeS
*/
#include "../COREDEFS.h"
#include "../config.h"
#define WriteXCDcallgcc WriteCompileCExec
#if 0

9
setup/makefiles/gcc.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef _GCC_H
#include _GCC_H
#include "../COREDEFS.h"
LOCALPROC WriteBashGccSpecificFiles(void);
#define WriteSpecificFiles WriteBashGccSpecificFiles
#endif

View File

@ -0,0 +1,61 @@
#ifndef _MAKEFILES_H
#define _MAKEFILES_H
#include "../config.h"
/* Include the corresponsing platform-specific file */
#if gbk_ide_mpw == cur_ide
#include "mpw.h"
#endif
#if gbk_ide_mw8 == cur_ide
#include "metrowerks8.h"
#endif
#if gbk_ide_mvc == cur_ide
#include "minivmac.h"
#endif
#if (gbk_ide_bgc == cur_ide) \
|| (gbk_ide_cyg == cur_ide) \
|| (gbk_ide_mgw == cur_ide) \
|| (gbk_ide_dkp == cur_ide) \
|| (gbk_ide_dvc == cur_ide) \
|| (gbk_ide_xcd == cur_ide)
#include "gcc.h"
#endif
#if gbk_ide_snc == cur_ide
#include "sun.h"
#endif
#if gbk_ide_msv == cur_ide
#include "msvc.h"
#endif
#if gbk_ide_lcc == cur_ide
#include "lcc.h"
#endif
#if gbk_ide_dvc == cur_ide
#include "bloodshed.h"
#endif
#if gbk_ide_xcd == cur_ide
#include "xcode.h"
#endif
#if gbk_ide_dmc == cur_ide
#include "digitalmars.h"
#endif
#if gbk_ide_plc == cur_ide
#include "pelles.h"
#endif
#if gbk_ide_ccc == cur_ide
#include "generic.h"
#endif
#endif

View File

@ -17,11 +17,8 @@
#include <stdlib.h>
#include <string.h>
#include "COREDEFS.i"
#include "CNFGOPTS.i"
#include "CONFIGUR.i"
#include "CNFGDLFT.i"
#include "COREDEFS.h"
#include "config.h"
#define MyMoveBytes(src, dst, n) \
@ -78,58 +75,7 @@
#pragma segment Body3
#endif
#if gbk_ide_mpw == cur_ide
#include "WRMPWFLS.i"
#endif
#if gbk_ide_mw8 == cur_ide
#include "WRMW8FLS.i"
#endif
#if gbk_ide_mvc == cur_ide
#include "WRMVCFLS.i"
#endif
#if (gbk_ide_bgc == cur_ide) \
|| (gbk_ide_cyg == cur_ide) \
|| (gbk_ide_mgw == cur_ide) \
|| (gbk_ide_dkp == cur_ide) \
|| (gbk_ide_dvc == cur_ide) \
|| (gbk_ide_xcd == cur_ide)
#include "WRBGCFLS.i"
#endif
#if gbk_ide_snc == cur_ide
#include "WRSNCFLS.i"
#endif
#if gbk_ide_msv == cur_ide
#include "WRMSCFLS.i"
#endif
#if gbk_ide_lcc == cur_ide
#include "WRLCCFLS.i"
#endif
#if gbk_ide_dvc == cur_ide
#include "WRDVCFLS.i"
#endif
#if gbk_ide_xcd == cur_ide
#include "WRXCDFLS.i"
#endif
#if gbk_ide_dmc == cur_ide
#include "WRDMCFLS.i"
#endif
#if gbk_ide_plc == cur_ide
#include "WRPLCFLS.i"
#endif
#if gbk_ide_ccc == cur_ide
#include "WRCCCFLS.i"
#endif
#include "makefiles/makefiles.h"
#if NeedSegmenting
#pragma segment Body4

View File

@ -20,6 +20,7 @@
used to make an MPW tool.
*/
#include "COREDEFS.h"
LOCALVAR int The_argc;
LOCALVAR int The_argi;

View File

@ -19,6 +19,8 @@
Some very basic string macros and routines.
*/
#include "COREDEFS.h"
#define PStrLength(s) (*(s))
#define PStrToMyCharPtr(s) ((s) + 1)