mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-07 06:51:10 +00:00
Cleanup for builds
This commit is contained in:
parent
19331ee385
commit
65a2b83abd
6 changed files with 20 additions and 37 deletions
21
BSDmakefile
21
BSDmakefile
|
@ -49,11 +49,8 @@ TESTSUITE = testsuite
|
||||||
PAK = gmqpak
|
PAK = gmqpak
|
||||||
|
|
||||||
#standard rules
|
#standard rules
|
||||||
c.o: ${.IMPSRC}
|
c.o: ${.IMPSRC}
|
||||||
$(CC) -c ${.IMPSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS)
|
$(CC) -c ${.IMPSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS)
|
||||||
|
|
||||||
exec-standalone.o: exec.c
|
|
||||||
$(CC) -c ${.ALLSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS) -DQCVM_EXECUTOR=1
|
|
||||||
|
|
||||||
$(QCVM): $(OBJ_X)
|
$(QCVM): $(OBJ_X)
|
||||||
$(CC) -o ${.TARGET} ${.IMPSRC} $(LDFLAGS) $(LIBS) $(OBJ_X)
|
$(CC) -o ${.TARGET} ${.IMPSRC} $(LDFLAGS) $(LIBS) $(OBJ_X)
|
||||||
|
@ -74,18 +71,14 @@ check: all
|
||||||
test: all
|
test: all
|
||||||
@ ./$(TESTSUITE)
|
@ ./$(TESTSUITE)
|
||||||
|
|
||||||
|
strip: $(GMQCC) $(QCVM) $(TESTSUITE)
|
||||||
|
strip $(GMQCC)
|
||||||
|
strip $(QCVM)
|
||||||
|
strip $(TESTSUITE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.o $(GMQCC) $(QCVM) $(TESTSUITE) $(PAK) *.dat gource.mp4 *.exe gm-qcc.tgz ./cov-int
|
rm -rf *.o $(GMQCC) $(QCVM) $(TESTSUITE) $(PAK) *.dat gource.mp4 *.exe gm-qcc.tgz ./cov-int
|
||||||
|
|
||||||
splint:
|
|
||||||
@ splint $(SPLINTFLAGS) *.c *.h
|
|
||||||
|
|
||||||
gource:
|
|
||||||
@ gource $(GOURCEFLAGS)
|
|
||||||
|
|
||||||
gource-record:
|
|
||||||
@ gource $(GOURCEFLAGS) -o - | ffmpeg $(FFMPEGFLAGS) gource.mp4
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
@makedepend -Y -f BSDmakefile -w 65536 2> /dev/null ${DEPS:C/\.o/.c/g}
|
@makedepend -Y -f BSDmakefile -w 65536 2> /dev/null ${DEPS:C/\.o/.c/g}
|
||||||
|
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -85,9 +85,6 @@ endif
|
||||||
c.o:
|
c.o:
|
||||||
$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
|
$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
|
||||||
|
|
||||||
exec-standalone.o: exec.c
|
|
||||||
$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) -DQCVM_EXECUTOR=1
|
|
||||||
|
|
||||||
$(QCVM): $(OBJ_X)
|
$(QCVM): $(OBJ_X)
|
||||||
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
||||||
|
|
||||||
|
@ -115,15 +112,6 @@ strip: $(GMQCC) $(QCVM) $(TESTSUITE)
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.o $(GMQCC) $(QCVM) $(TESTSUITE) $(PAK) *.dat gource.mp4 *.exe gm-qcc.tgz ./cov-int
|
rm -rf *.o $(GMQCC) $(QCVM) $(TESTSUITE) $(PAK) *.dat gource.mp4 *.exe gm-qcc.tgz ./cov-int
|
||||||
|
|
||||||
splint:
|
|
||||||
@ splint $(SPLINTFLAGS) *.c *.h
|
|
||||||
|
|
||||||
gource:
|
|
||||||
@ gource $(GOURCEFLAGS)
|
|
||||||
|
|
||||||
gource-record:
|
|
||||||
@ gource $(GOURCEFLAGS) -o - | ffmpeg $(FFMPEGFLAGS) gource.mp4
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
@ makedepend -Y -w 65536 2> /dev/null $(subst .o,.c,$(DEPS))
|
@ makedepend -Y -w 65536 2> /dev/null $(subst .o,.c,$(DEPS))
|
||||||
|
|
||||||
|
|
2
code.c
2
code.c
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
typedef union {
|
typedef union {
|
||||||
void *enter;
|
void *enter;
|
||||||
qcint_t leave;
|
qcint_t leave;
|
||||||
} code_hash_entry_t;
|
} code_hash_entry_t;
|
||||||
|
|
||||||
/* Some sanity macros */
|
/* Some sanity macros */
|
||||||
|
|
4
conout.c
4
conout.c
|
@ -213,8 +213,7 @@ void con_cprintmsg(lex_ctx_t ctx, int lvl, const char *msgtype, const char *msg,
|
||||||
va_end (va);
|
va_end (va);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QCVM_EXECUTOR
|
/* General error interface: TODO seperate as part of the compiler front-end */
|
||||||
/* General error interface */
|
|
||||||
size_t compile_errors = 0;
|
size_t compile_errors = 0;
|
||||||
size_t compile_warnings = 0;
|
size_t compile_warnings = 0;
|
||||||
size_t compile_Werrors = 0;
|
size_t compile_Werrors = 0;
|
||||||
|
@ -279,4 +278,3 @@ bool GMQCC_WARN compile_warning(lex_ctx_t ctx, int warntype, const char *fmt, ..
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
2
exec.c
2
exec.c
|
@ -587,7 +587,6 @@ cleanup:
|
||||||
* main for when building the standalone executor
|
* main for when building the standalone executor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(QCVM_EXECUTOR)
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
const char *type_name[TYPE_COUNT] = {
|
const char *type_name[TYPE_COUNT] = {
|
||||||
|
@ -1226,7 +1225,6 @@ void prog_disasm_function(qc_program_t *prog, size_t id) {
|
||||||
++st;
|
++st;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#else /* !QCVM_LOOP */
|
#else /* !QCVM_LOOP */
|
||||||
/*
|
/*
|
||||||
* Everything from here on is not including into the compilation of the
|
* Everything from here on is not including into the compilation of the
|
||||||
|
|
16
include.mk
16
include.mk
|
@ -20,7 +20,7 @@ COMMON = ansi.o util.o stat.o fs.o opts.o conout.o
|
||||||
OBJ_C = $(COMMON) main.o lexer.o parser.o code.o ast.o ir.o ftepp.o utf8.o correct.o fold.o intrin.o
|
OBJ_C = $(COMMON) main.o lexer.o parser.o code.o ast.o ir.o ftepp.o utf8.o correct.o fold.o intrin.o
|
||||||
OBJ_P = $(COMMON) pak.o
|
OBJ_P = $(COMMON) pak.o
|
||||||
OBJ_T = $(COMMON) test.o
|
OBJ_T = $(COMMON) test.o
|
||||||
OBJ_X = $(COMMON) exec-standalone.o
|
OBJ_X = $(COMMON) exec.o
|
||||||
|
|
||||||
#gource flags
|
#gource flags
|
||||||
GOURCEFLAGS = \
|
GOURCEFLAGS = \
|
||||||
|
@ -111,13 +111,19 @@ uninstall:
|
||||||
rm -f $(DESTDIR)$(MANDIR)/man1/doc/qcvm.1
|
rm -f $(DESTDIR)$(MANDIR)/man1/doc/qcvm.1
|
||||||
rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqpak.1
|
rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqpak.1
|
||||||
|
|
||||||
|
#style rule
|
||||||
STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \)
|
STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \)
|
||||||
|
|
||||||
whitespace:
|
style:
|
||||||
find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';'
|
find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';'
|
||||||
newline:
|
|
||||||
find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';'
|
find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';'
|
||||||
indent:
|
|
||||||
find . -type f $(STYLE_MATCH) -exec sed -i 's/\t/ /g' '{}' ';'
|
find . -type f $(STYLE_MATCH) -exec sed -i 's/\t/ /g' '{}' ';'
|
||||||
|
|
||||||
style: whitespace newline indent
|
splint:
|
||||||
|
@splint $(SPLINTFLAGS) *.c *.h
|
||||||
|
|
||||||
|
gource:
|
||||||
|
@gource $(GOURCEFLAGS)
|
||||||
|
|
||||||
|
gource-record:
|
||||||
|
@gource $(GOURCEFLAGS) -o - | ffmpeg $(FFMPEGFLAGS) gource.mp4
|
||||||
|
|
Loading…
Reference in a new issue