mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
79 lines
2.7 KiB
Plaintext
79 lines
2.7 KiB
Plaintext
$NetBSD: patch-ad,v 1.1.1.1 2012/04/27 04:48:44 agc Exp $
|
|
|
|
Use a better (BSD) Makefile
|
|
|
|
--- Makefile 2012/04/26 13:04:31 1.1
|
|
+++ Makefile 2012/04/26 13:04:39
|
|
@@ -1,55 +1,18 @@
|
|
-CC=gcc
|
|
-CFLAGS=-Wall -pedantic -g -DUNIX_HOST
|
|
-LIBS=-lm -lreadline
|
|
+PROG=picoc
|
|
+CPPFLAGS+= -DUNIX_HOST
|
|
+LDADD+=-lm -ledit
|
|
+# interpreter source
|
|
+SRCS= picoc.c table.c lex.c parse.c expression.c heap.c type.c
|
|
+SRCS+= variable.c clibrary.c platform.c include.c
|
|
+# platform
|
|
+SRCS+= platform_unix.c library_unix.c
|
|
+# cstdlib
|
|
+SRCS+= stdio.c math.c string.c stdlib.c
|
|
+SRCS+= time.c errno.c ctype.c stdbool.c
|
|
+SRCS+= unistd.c
|
|
+MKMAN=no
|
|
+WARNS=0
|
|
|
|
-TARGET = picoc
|
|
-SRCS = picoc.c table.c lex.c parse.c expression.c heap.c type.c \
|
|
- variable.c clibrary.c platform.c include.c \
|
|
- platform/platform_unix.c platform/library_unix.c \
|
|
- cstdlib/stdio.c cstdlib/math.c cstdlib/string.c cstdlib/stdlib.c \
|
|
- cstdlib/time.c cstdlib/errno.c cstdlib/ctype.c cstdlib/stdbool.c \
|
|
- cstdlib/unistd.c
|
|
-OBJS := $(SRCS:%.c=%.o)
|
|
+.PATH: ${.CURDIR} ${.CURDIR}/cstdlib ${.CURDIR}/platform
|
|
|
|
-all: $(TARGET)
|
|
-
|
|
-$(TARGET): $(OBJS)
|
|
- $(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|
|
-
|
|
-test: all
|
|
- (cd tests; make test)
|
|
-
|
|
-clean:
|
|
- rm -f $(TARGET) $(OBJS) *~
|
|
-
|
|
-count:
|
|
- @echo "Core:"
|
|
- @cat picoc.h interpreter.h picoc.c table.c lex.c parse.c expression.c platform.c heap.c type.c variable.c include.c | grep -v '^[ ]*/\*' | grep -v '^[ ]*$$' | wc
|
|
- @echo ""
|
|
- @echo "Everything:"
|
|
- @cat $(SRCS) *.h */*.h | wc
|
|
-
|
|
-.PHONY: clibrary.c
|
|
-
|
|
-picoc.o: picoc.c picoc.h
|
|
-table.o: table.c interpreter.h platform.h
|
|
-lex.o: lex.c interpreter.h platform.h
|
|
-parse.o: parse.c picoc.h interpreter.h platform.h
|
|
-expression.o: expression.c interpreter.h platform.h
|
|
-heap.o: heap.c interpreter.h platform.h
|
|
-type.o: type.c interpreter.h platform.h
|
|
-variable.o: variable.c interpreter.h platform.h
|
|
-clibrary.o: clibrary.c picoc.h interpreter.h platform.h
|
|
-platform.o: platform.c picoc.h interpreter.h platform.h
|
|
-include.o: include.c picoc.h interpreter.h platform.h
|
|
-platform/platform_unix.o: platform/platform_unix.c picoc.h interpreter.h platform.h
|
|
-platform/library_unix.o: platform/library_unix.c interpreter.h platform.h
|
|
-cstdlib/stdio.o: cstdlib/stdio.c interpreter.h platform.h
|
|
-cstdlib/math.o: cstdlib/math.c interpreter.h platform.h
|
|
-cstdlib/string.o: cstdlib/string.c interpreter.h platform.h
|
|
-cstdlib/stdlib.o: cstdlib/stdlib.c interpreter.h platform.h
|
|
-cstdlib/time.o: cstdlib/time.c interpreter.h platform.h
|
|
-cstdlib/errno.o: cstdlib/errno.c interpreter.h platform.h
|
|
-cstdlib/ctype.o: cstdlib/ctype.c interpreter.h platform.h
|
|
-cstdlib/stdbool.o: cstdlib/stdbool.c interpreter.h platform.h
|
|
-cstdlib/unistd.o: cstdlib/unistd.c interpreter.h platform.h
|
|
+.include <bsd.prog.mk>
|