mirror of
https://github.com/InvisibleUp/uvmac.git
synced 2024-12-21 01:29:38 +00:00
Started a rewrite of the makefile generator.
Probably not worth it, let's be honest...
This commit is contained in:
parent
48676c4abf
commit
a8e9bc990e
@ -17,6 +17,8 @@
|
||||
BuiLD system UTILities part 3
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
|
||||
#define src_d_name "src"
|
||||
#define cfg_d_name "cfg"
|
@ -17,6 +17,9 @@
|
||||
BuiLD system UTILities part 4
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
#include "CNFGDLFT.h"
|
||||
|
||||
LOCALPROC WriteOutDummyContents(void)
|
||||
{
|
||||
WriteDestFileLn(
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
CONFIGUR.i
|
||||
*/
|
||||
|
||||
/*
|
||||
CONFIGURation file
|
||||
|
||||
see CNFGDLFT.i and CNFGOPTS.i for things
|
||||
that can go here.
|
||||
*/
|
@ -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
|
@ -17,6 +17,8 @@
|
||||
GeNeric BuiLD OPTions
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
/* --- default definitions for SPBASDEF --- */
|
||||
|
||||
#ifndef MayUseSound
|
@ -17,6 +17,8 @@
|
||||
program SPecific BuiLD OPTions
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
/* option: model */
|
||||
|
||||
enum {
|
@ -20,6 +20,8 @@
|
||||
only by platform specific code)
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
|
||||
LOCALPROC WriteAppSpecificCNFGRAPIoptions(void)
|
||||
{
|
@ -17,6 +17,8 @@
|
||||
program SPecific CoNFiGuration GLobals
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
LOCALPROC WriteAppSpecificCNFGGLOBoptions(void)
|
||||
{
|
||||
WriteBlankLineToDestFile();
|
@ -17,7 +17,7 @@
|
||||
program SPecific FILe DEFinitions
|
||||
*/
|
||||
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
/* --- list of source files --- */
|
||||
|
@ -17,6 +17,8 @@
|
||||
program SPecific write OTHer ConFiguration files
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
LOCALPROC WriteAppCNFGGLOBContents(void)
|
||||
{
|
||||
WriteCommonCNFGGLOBContents();
|
@ -17,6 +17,8 @@
|
||||
USe program SPecific FILe DEFinitions
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
LOCALPROC NullProc(void)
|
||||
{
|
||||
}
|
@ -17,6 +17,8 @@
|
||||
WRite "CNFGrAPi.h"
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
LOCALPROC WriteOSXLocalTalkCNFGRAPI(void)
|
||||
{
|
||||
WriteDestFileLn("#include <unistd.h>");
|
@ -17,6 +17,8 @@
|
||||
WRite "CNFGGLob.h"
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
|
||||
LOCALPROC WriteConfigurationWarning(void)
|
||||
{
|
@ -17,6 +17,8 @@
|
||||
WRite MACintosh RESources configuration
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
|
||||
LOCALPROC WriteBeginResResource(char *types, int id)
|
||||
{
|
@ -17,6 +17,7 @@
|
||||
WRite Macintosh PLIST
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
enum {
|
||||
kPListRaw, /* native plist data */
|
@ -17,6 +17,7 @@
|
||||
WRite TEXT FiLe
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
|
||||
/* --- routines for writing text files --- */
|
8
setup/config.h
Normal file
8
setup/config.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Configuration file
|
||||
|
||||
Insert overrides for defaults.h and options.h here
|
||||
*/
|
||||
|
||||
#include "config/defaults.h"
|
||||
#include "config/options.h"
|
@ -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
|
@ -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
|
@ -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
9
setup/makefiles/gcc.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef _GCC_H
|
||||
#include _GCC_H
|
||||
|
||||
#include "../COREDEFS.h"
|
||||
|
||||
LOCALPROC WriteBashGccSpecificFiles(void);
|
||||
#define WriteSpecificFiles WriteBashGccSpecificFiles
|
||||
|
||||
#endif
|
61
setup/makefiles/makefiles.h
Normal file
61
setup/makefiles/makefiles.h
Normal 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
|
60
setup/tool.c
60
setup/tool.c
@ -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
|
||||
|
@ -20,6 +20,7 @@
|
||||
used to make an MPW tool.
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
LOCALVAR int The_argc;
|
||||
LOCALVAR int The_argi;
|
@ -19,6 +19,8 @@
|
||||
Some very basic string macros and routines.
|
||||
*/
|
||||
|
||||
#include "COREDEFS.h"
|
||||
|
||||
|
||||
#define PStrLength(s) (*(s))
|
||||
#define PStrToMyCharPtr(s) ((s) + 1)
|
Loading…
Reference in New Issue
Block a user