Don't use gen_art_config - supply art_config.h instead (made using nspr).

Makes the build stuff easier.
This commit is contained in:
bbaetz%cs.mcgill.ca 2001-11-19 22:12:29 +00:00
Родитель 544c63991e
Коммит 25d77eb313
4 изменённых файлов: 12 добавлений и 71 удалений

Просмотреть файл

@ -1,7 +1,4 @@
.deps
Makefile
art_config.h
gen_art_config
host_gen_art_config
testart
testuta

Просмотреть файл

@ -9,8 +9,6 @@ include $(DEPTH)/config/autoconf.mk
MODULE = libart_lgpl
LIBRARY_NAME = moz_art_lgpl
REQUIRES = nspr
CSRCS = \
art_affine.c \
art_alphagamma.c \
@ -100,14 +98,6 @@ EXPORTS = \
libart-features.h \
$(NULL)
ifdef CROSS_COMPILE
GEN_ART_CONFIG = host_gen_art_config$(BIN_SUFFIX)
HOST_SIMPLE_PROGRAMS = $(GEN_ART_CONFIG)
else
GEN_ART_CONFIG = gen_art_config$(BIN_SUFFIX)
SIMPLE_PROGRAMS = $(GEN_ART_CONFIG)
endif
ifdef ENABLE_TESTS
SIMPLE_PROGRAMS = testart testuta
endif
@ -118,12 +108,6 @@ FORCE_SHARED_LIB = 1
include $(topsrcdir)/config/rules.mk
art_config.h: $(GEN_ART_CONFIG) Makefile Makefile.in
./$(GEN_ART_CONFIG) > art_config.h
DEFINES += -DLIBART_COMPILATION
# SIMPLE_PROGRAMS doesn't use REQUIRES, but we need this for config.h!
CFLAGS += -I$(DIST)/include/nspr
LIBS += -L. -l$(LIBRARY_NAME)

Просмотреть файл

@ -0,0 +1,12 @@
/* This isn't pregenerated - use nspr, instead */
#include "prtypes.h"
#define ART_SIZEOF_CHAR PR_BYTES_PER_BYTE
#define ART_SIZEOF_SHORT PR_BYTES_PER_SHORT
#define ART_SIZEOF_INT PR_BYTES_PER_ING
#define ART_SIZEOF_LONG PR_BYTES_PER_LONG
typedef PRUint8 art_u8;
typedef PRUint16 art_u16;
typedef PRUint32 art_u32;

Просмотреть файл

@ -1,52 +0,0 @@
#include <stdio.h>
#include "config.h"
#include <stdlib.h>
/**
* A little utility function to generate header info.
*
* Yes, it would be possible to do this using more "native" autoconf
* features, but I personally find this approach to be cleaner.
*
* The output of this program is generally written to art_config.h,
* which is installed in libart's include dir.
**/
static void
die (char *why)
{
fprintf (stderr, "gen_art_config: %s\n", why);
exit (1);
}
int
main (int argc, char **argv)
{
printf ("/* Automatically generated by gen_art_config.c */\n"
"\n"
"#define ART_SIZEOF_CHAR %d\n"
"#define ART_SIZEOF_SHORT %d\n"
"#define ART_SIZEOF_INT %d\n"
"#define ART_SIZEOF_LONG %d\n"
"\n",
(int)sizeof(char), (int)sizeof(short), (int)sizeof(int), (int)sizeof(long));
if (sizeof(char) == 1)
printf ("typedef unsigned char art_u8;\n");
else
die ("sizeof(char) != 1");
if (sizeof(short) == 2)
printf ("typedef unsigned short art_u16;\n");
else
die ("sizeof(short) != 2");
if (sizeof(int) == 4)
printf ("typedef unsigned int art_u32;\n");
else if (sizeof(long) == 4)
printf ("typedef unsigned long art_u32;\n");
else
die ("sizeof(int) != 4 and sizeof(long) != 4");
return 0;
}