mirror of
https://github.com/ksherlock/mpw-tools.git
synced 2025-04-26 02:43:15 +00:00
move libc/ headers to include/ , add lib/
This commit is contained in:
parent
a1baaf5f50
commit
4fc03aab47
@ -5,7 +5,7 @@
|
||||
#include <ctype.h>
|
||||
#include <Processes.h>
|
||||
|
||||
#include "libc/libc.h"
|
||||
#include <libc.h>
|
||||
|
||||
#define msizeof(type, member) sizeof( ((type *)0)->member)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libc/libc.h"
|
||||
#include <libc.h>
|
||||
|
||||
unsigned long GlobalAddress(const char *name, int *numeric)
|
||||
{
|
||||
|
32
include/sys/cdefs.h
Normal file
32
include/sys/cdefs.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef _SYS_CDEFS_H_
|
||||
#define _SYS_CDEFS_H_
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#define __BEGIN_DECLS extern "C" {
|
||||
#define __END_DECLS }
|
||||
#else
|
||||
#define __BEGIN_DECLS
|
||||
#define __END_DECLS
|
||||
#endif
|
||||
|
||||
#define __const const
|
||||
#define __restrict
|
||||
#define __signed signed
|
||||
#define __volatile volatile
|
||||
#if defined(__cplusplus)
|
||||
#define __inline inline
|
||||
#else
|
||||
#define __inline
|
||||
#endif
|
||||
|
||||
#define __dead2
|
||||
#define __pure2
|
||||
#define __unused
|
||||
#define __used
|
||||
#define __deprecated
|
||||
#define __unavailable
|
||||
#define __dead
|
||||
#define __pure
|
||||
|
||||
#endif
|
||||
|
@ -110,6 +110,11 @@ typedef unsigned long ulong32;
|
||||
#define LTC_ARGCHKVD(x) LTC_ARGCHK(x)
|
||||
|
||||
|
||||
#define LTC_MD2
|
||||
#define LTC_MD4
|
||||
#define LTC_MD5
|
||||
#define LTC_SHA1
|
||||
|
||||
//#include <tomcrypt_cfg.h>
|
||||
//#include <tomcrypt_macros.h>
|
||||
//#include <tomcrypt_cipher.h>
|
31
makefile
31
makefile
@ -14,7 +14,7 @@ LDFLAGS = -w -c 'MPS ' -t MPST \
|
||||
-sn STDIO=Main -sn INTENV=Main -sn %A5Init=Main
|
||||
|
||||
LIBFLAGS = -P
|
||||
SCFLAGS = -P -I libc/ -I ./
|
||||
SCFLAGS = -P -I include/
|
||||
|
||||
# MPW 3.5
|
||||
|
||||
@ -36,7 +36,10 @@ all: $(TARGETS)
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(TARGETS)
|
||||
rm -f libc/libc libc/*.o
|
||||
rm -f lib/libc libc/*.o
|
||||
rm -f lib/*
|
||||
rm -f libtomcrypt/src/hashes/*.o
|
||||
|
||||
|
||||
dist/Tools.tgz: $(TARGETS)
|
||||
cp $^ dist/Tools/
|
||||
@ -47,7 +50,10 @@ dist/Tools.tgz: $(TARGETS)
|
||||
install: $(TARGETS)
|
||||
cp $^ ~/mpw/Tools/
|
||||
|
||||
libc/libc: libc/strcasecmp.c.o libc/_getprogname.c.o libc/err.c.o libc/getopt.c.o libc/basename.c.o
|
||||
lib:
|
||||
mkdir lib
|
||||
|
||||
lib/libc: libc/strcasecmp.c.o libc/_getprogname.c.o libc/err.c.o libc/getopt.c.o libc/basename.c.o | lib
|
||||
$(MPW) Lib $(LIBFLAGS) -o $@ $^
|
||||
|
||||
GetEnv: GetEnv.c.o
|
||||
@ -78,14 +84,14 @@ ListRez: ListRez.c.o
|
||||
ListRezIIgs: ListRezIIgs.c.o
|
||||
$(MPW) Link $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
LSeg: LSeg.c.o libc/libc
|
||||
LSeg: LSeg.c.o lib/libc
|
||||
$(MPW) Link $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
|
||||
MakeEnums: MakeEnums.c.o libc/libc
|
||||
MakeEnums: MakeEnums.c.o lib/libc
|
||||
$(MPW) Link $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
ReadGlobal: ReadGlobal.c.o libc/libc
|
||||
ReadGlobal: ReadGlobal.c.o lib/libc
|
||||
$(MPW) Link $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
Parameters: Parameters.c.o
|
||||
@ -94,16 +100,21 @@ Parameters: Parameters.c.o
|
||||
Echo: Echo.c.o
|
||||
$(MPW) Link $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
md5 : md5.c.o libtomcrypt/src/hashes/md5.c.o
|
||||
|
||||
md5 : md5.c.o lib/libtomcrypt
|
||||
$(MPW) Link $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
md5.c.o : md5.c
|
||||
$(MPW) SC -P -I . -I libtomcrypt/src/headers $< -o $@
|
||||
$(MPW) SC $(SCFLAGS) -I libtomcrypt/src/headers $< -o $@
|
||||
|
||||
libtomcrypt/src/hashes/md5.c.o : libtomcrypt/src/hashes/md5.c
|
||||
$(MPW) SC -P -I . -I libtomcrypt/src/headers -d LTC_MD5 $< -o $@
|
||||
LTC_H = libtomcrypt/src/hashes/
|
||||
lib/libtomcrypt : $(LTC_H)/md2.c.o $(LTC_H)/md4.c.o $(LTC_H)/md5.c.o $(LTC_H)/sha1.c.o | lib
|
||||
$(MPW) Lib $(LIBFLAGS) -o $@ $^
|
||||
|
||||
|
||||
$(LTC_H)%.c.o : $(LTC_H)%.c
|
||||
$(MPW) SC $(SCFLAGS) -I libtomcrypt/src/headers/ $< -o $@
|
||||
|
||||
#SetFile.c : SetFile.rl
|
||||
# ragel -G2 -p -m -o $@ $<
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user