PAK = gmqpak
#standard rules
-c.o: ${.IMPSRC}
- $(CC) -c ${.IMPSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS)
-
-exec-standalone.o: exec.c
- $(CC) -c ${.ALLSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS) -DQCVM_EXECUTOR=1
+c.o: ${.IMPSRC}
+ $(CC) -c ${.IMPSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS)
$(QCVM): $(OBJ_X)
$(CC) -o ${.TARGET} ${.IMPSRC} $(LDFLAGS) $(LIBS) $(OBJ_X)
test: all
@ ./$(TESTSUITE)
+strip: $(GMQCC) $(QCVM) $(TESTSUITE)
+ strip $(GMQCC)
+ strip $(QCVM)
+ strip $(TESTSUITE)
+
clean:
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:
@makedepend -Y -f BSDmakefile -w 65536 2> /dev/null ${DEPS:C/\.o/.c/g}
c.o:
$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
-exec-standalone.o: exec.c
- $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) -DQCVM_EXECUTOR=1
-
$(QCVM): $(OBJ_X)
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
clean:
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:
@ makedepend -Y -w 65536 2> /dev/null $(subst .o,.c,$(DEPS))
*/
typedef union {
void *enter;
- qcint_t leave;
+ qcint_t leave;
} code_hash_entry_t;
/* Some sanity macros */
va_end (va);
}
-#ifndef QCVM_EXECUTOR
-/* General error interface */
+/* General error interface: TODO seperate as part of the compiler front-end */
size_t compile_errors = 0;
size_t compile_warnings = 0;
size_t compile_Werrors = 0;
va_end(ap);
return r;
}
-#endif
* main for when building the standalone executor
*/
-#if defined(QCVM_EXECUTOR)
#include <math.h>
const char *type_name[TYPE_COUNT] = {
++st;
}
}
-#endif
#else /* !QCVM_LOOP */
/*
* Everything from here on is not including into the compilation of the
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_T = $(COMMON) test.o
-OBJ_X = $(COMMON) exec-standalone.o
+OBJ_X = $(COMMON) exec.o
#gource flags
GOURCEFLAGS = \
rm -f $(DESTDIR)$(MANDIR)/man1/doc/qcvm.1
rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqpak.1
+#style rule
STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \)
-whitespace:
+style:
find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';'
-newline:
find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';'
-indent:
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