mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-29 06:10:09 +08:00
Revert "Make examples' shebang use target tcc bindir path"
This reverts commit cb2138f8b0
.
This commit is contained in:
parent
4d6a4a26e0
commit
571465d32b
14
Makefile
14
Makefile
@ -141,16 +141,15 @@ ifdef CONFIG_USE_LIBGCC
|
|||||||
LIBTCC1=
|
LIBTCC1=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TCCLIBS := $(LIBTCC1) $(LIBTCC) $(BCHECK_O)
|
TCCLIBS = $(LIBTCC1) $(LIBTCC) $(BCHECK_O)
|
||||||
TCCDOCS := tcc.1 tcc-doc.html tcc-doc.info
|
TCCDOCS = tcc.1 tcc-doc.html tcc-doc.info
|
||||||
TCCEXS := $(patsubst ex%.c.template,ex%.c,$(wildcard examples/ex*.c.template))
|
|
||||||
|
|
||||||
ifdef CONFIG_CROSS
|
ifdef CONFIG_CROSS
|
||||||
PROGS+=$(PROGS_CROSS)
|
PROGS+=$(PROGS_CROSS)
|
||||||
TCCLIBS+=$(LIBTCC1_CROSS)
|
TCCLIBS+=$(LIBTCC1_CROSS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(PROGS) $(TCCLIBS) $(TCCDOCS) $(TCCEXS)
|
all: $(PROGS) $(TCCLIBS) $(TCCDOCS)
|
||||||
|
|
||||||
# Host Tiny C Compiler
|
# Host Tiny C Compiler
|
||||||
tcc$(EXESUF): tcc.o $(LIBTCC)
|
tcc$(EXESUF): tcc.o $(LIBTCC)
|
||||||
@ -325,11 +324,6 @@ tcc.1: tcc-doc.texi
|
|||||||
tcc-doc.info: tcc-doc.texi
|
tcc-doc.info: tcc-doc.texi
|
||||||
-makeinfo tcc-doc.texi
|
-makeinfo tcc-doc.texi
|
||||||
|
|
||||||
# examples
|
|
||||||
examples/ex%.c: examples/ex%.c.template
|
|
||||||
sed '1s/@BINDIR@/$(subst /,\/,$(bindir))/' $< > $@
|
|
||||||
chmod a+x $@
|
|
||||||
|
|
||||||
.PHONY: all clean tar distclean install uninstall FORCE
|
.PHONY: all clean tar distclean install uninstall FORCE
|
||||||
|
|
||||||
# tar release (use 'make -k tar' on a checkouted tree)
|
# tar release (use 'make -k tar' on a checkouted tree)
|
||||||
@ -347,7 +341,7 @@ export LIBTCC1
|
|||||||
$(MAKE) -C tests $@
|
$(MAKE) -C tests $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF) $(TCCEXS)
|
rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF)
|
||||||
$(MAKE) -C tests $@
|
$(MAKE) -C tests $@
|
||||||
ifneq ($(LIBTCC1),)
|
ifneq ($(LIBTCC1),)
|
||||||
$(MAKE) -C lib $@
|
$(MAKE) -C lib $@
|
||||||
|
3
README
3
README
@ -65,8 +65,7 @@ operations given a list of numbers (benchmark).
|
|||||||
ex3.c: compute fibonacci numbers (benchmark).
|
ex3.c: compute fibonacci numbers (benchmark).
|
||||||
|
|
||||||
ex4.c: more complicated: X11 program. Very complicated test in fact
|
ex4.c: more complicated: X11 program. Very complicated test in fact
|
||||||
because standard headers are being used ! As for ex1.c, can also be launched
|
because standard headers are being used !
|
||||||
directly as a script: './ex4.c'.
|
|
||||||
|
|
||||||
ex5.c: 'hello world' with standard glibc headers.
|
ex5.c: 'hello world' with standard glibc headers.
|
||||||
|
|
||||||
|
2
examples/ex1.c.template → examples/ex1.c
Normal file → Executable file
2
examples/ex1.c.template → examples/ex1.c
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
#! @BINDIR@/tcc -run
|
#! /usr/local/bin/tcc -run
|
||||||
#include <tcclib.h>
|
#include <tcclib.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
2
examples/ex4.c.template → examples/ex4.c
Normal file → Executable file
2
examples/ex4.c.template → examples/ex4.c
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
#! @BINDIR@/tcc -run -L/usr/X11R6/lib -lX11
|
#!./tcc -run -L/usr/X11R6/lib -lX11
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
Loading…
Reference in New Issue
Block a user