From 35c2891f5ee85f61a4bd4c733b340f54ba6396c0 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 25 Mar 2022 18:50:29 +0200 Subject: [PATCH] moved source code under src/ --- Makefile.in | 4 ++-- configure | 14 +++++++------- examples/cube/Makefile | 2 +- examples/simple/Makefile | 2 +- proto.c => src/proto.c | 0 proto.h => src/proto.h | 0 spnav.c => src/spnav.c | 0 spnav.h => src/spnav.h | 0 spnav_magellan.c => src/spnav_magellan.c | 0 spnav_magellan.h => src/spnav_magellan.h | 0 10 files changed, 11 insertions(+), 11 deletions(-) rename proto.c => src/proto.c (100%) rename proto.h => src/proto.h (100%) rename spnav.c => src/spnav.c (100%) rename spnav.h => src/spnav.h (100%) rename spnav_magellan.c => src/spnav_magellan.c (100%) rename spnav_magellan.h => src/spnav_magellan.h (100%) diff --git a/Makefile.in b/Makefile.in index 99fe4d8..351a309 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ -obj = spnav.o proto.o $(magellan_obj) -hdr = spnav.h spnav_magellan.h spnav_config.h +obj = src/spnav.o src/proto.o $(magellan_obj) +hdr = src/spnav.h src/spnav_magellan.h src/spnav_config.h name = spnav lib_a = lib$(name).a diff --git a/configure b/configure index e363d31..f9f25d2 100755 --- a/configure +++ b/configure @@ -104,7 +104,7 @@ if [ "$OPT" = 'yes' ]; then fi if [ "$X11" = 'yes' ]; then - echo 'magellan_obj = spnav_magellan.o' >>Makefile + echo 'magellan_obj = src/spnav_magellan.o' >>Makefile echo 'xlib = -lX11' >>Makefile fi @@ -112,14 +112,14 @@ cat "$srcdir/Makefile.in" >>Makefile # create spnav_config.h echo 'creating spnav_config.h ...' -echo '#ifndef SPNAV_CONFIG_H_' >spnav_config.h -echo '#define SPNAV_CONFIG_H_' >>spnav_config.h -echo '' >>spnav_config.h +echo '#ifndef SPNAV_CONFIG_H_' >src/spnav_config.h +echo '#define SPNAV_CONFIG_H_' >>src/spnav_config.h +echo '' >>src/spnav_config.h if [ "$X11" = 'yes' ]; then - echo '#define USE_X11' >>spnav_config.h - echo '' >>spnav_config.h + echo '#define USE_X11' >>src/spnav_config.h + echo '' >>src/spnav_config.h fi -echo '#endif /* SPNAV_CONFIG_H_ */' >>spnav_config.h +echo '#endif /* SPNAV_CONFIG_H_ */' >>src/spnav_config.h # create pkgconfig file echo 'creating spnav.pc ...' diff --git a/examples/cube/Makefile b/examples/cube/Makefile index 07ea805..1df205e 100644 --- a/examples/cube/Makefile +++ b/examples/cube/Makefile @@ -2,7 +2,7 @@ obj = cube.o vmath.o bin = cube CC = gcc -CFLAGS = -pedantic -Wall -g -I../.. -I/usr/local/include +CFLAGS = -pedantic -Wall -g -I../.. -I../../src -I/usr/local/include LDFLAGS = -L../.. -L/usr/local/lib -lX11 -lGL -lGLU -lm -lspnav $(bin): $(obj) diff --git a/examples/simple/Makefile b/examples/simple/Makefile index d2f4268..f075570 100644 --- a/examples/simple/Makefile +++ b/examples/simple/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -pedantic -Wall -g -I../.. -I/usr/local/include +CFLAGS = -pedantic -Wall -g -I../.. -I../../src -I/usr/local/include LDFLAGS = -L../.. -L/usr/local/lib -lspnav -lX11 .PHONY: all diff --git a/proto.c b/src/proto.c similarity index 100% rename from proto.c rename to src/proto.c diff --git a/proto.h b/src/proto.h similarity index 100% rename from proto.h rename to src/proto.h diff --git a/spnav.c b/src/spnav.c similarity index 100% rename from spnav.c rename to src/spnav.c diff --git a/spnav.h b/src/spnav.h similarity index 100% rename from spnav.h rename to src/spnav.h diff --git a/spnav_magellan.c b/src/spnav_magellan.c similarity index 100% rename from spnav_magellan.c rename to src/spnav_magellan.c diff --git a/spnav_magellan.h b/src/spnav_magellan.h similarity index 100% rename from spnav_magellan.h rename to src/spnav_magellan.h