From: nishi Date: Fri, 12 Apr 2024 15:14:00 +0000 (+0000) Subject: adding makefiles X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1d33a9b9a8ccd256fccc477b3d262a5581cfb30a;p=mandshurica.git adding makefiles git-svn-id: file:///raid/svn-main/nishi-mandshurica/trunk@3 f982e544-4a7d-3444-ad1a-fde59a2a69f1 --- diff --git a/DevForge/Makefile b/DevForge/Makefile index 72085cc..2f1eef8 100644 --- a/DevForge/Makefile +++ b/DevForge/Makefile @@ -1,18 +1,22 @@ # $Id$ +EXTRA_CFLAGS = +EXTRA_LDFLAGS = +EXTRA_LIBS = + .PHONY: all clean ifeq ($(shell uname -s),Linux) -LIBS += -ldl +EXTRA_LIBS += -ldl endif all: ./devforge ./devforge: ./main.o - $(CC) $(LDFLAGS) -o $@ $< $(LIBS) + $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $< $(LIBS) $(EXTRA_LIBS) ./main.o: ./main.c ./devforge.h - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< clean: rm -f ./devforge ./*.o diff --git a/Makefile b/Makefile index 7614be3..598a945 100644 --- a/Makefile +++ b/Makefile @@ -25,5 +25,5 @@ replace: done clean: - $(MAKE) -C ./DevForge - $(MAKE) -C ./Module + $(MAKE) -C ./DevForge clean + $(MAKE) -C ./Module clean diff --git a/Module/Makefile b/Module/Makefile new file mode 100644 index 0000000..c1a1c16 --- /dev/null +++ b/Module/Makefile @@ -0,0 +1,18 @@ +# $Id$ + +EXTRA_CFLAGS = -fPIC +EXTRA_LDFLAGS = -shared +EXTRA_LIBS = + +.PHONY: all clean + +all: ./subversion.so + +./%.so: ./%.o + $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS) + +./%.o: ./%.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< + +clean: + rm -f *.so *.o diff --git a/Module/subversion.c b/Module/subversion.c new file mode 100644 index 0000000..a15a39f --- /dev/null +++ b/Module/subversion.c @@ -0,0 +1,3 @@ +/* $Id$ */ +/* --- START LICENSE --- */ +/* --- END LICENSE --- */