Fixes #38. Use Luis's PREFIX trick.

This commit is contained in:
Ryan Dahl 2011-05-07 21:40:46 -07:00
parent 7ac17b20c4
commit db2189f3b9
3 changed files with 14 additions and 9 deletions

View File

@ -28,11 +28,11 @@ endif
all: oio.a test/run-tests test/run-benchmarks
test/run-tests: test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) oio.a
test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) oio.a
$(CC) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-tests test/run-tests.c \
test/runner.c $(RUNNER_SRC) $(TESTS) oio.a
test/run-benchmarks: test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) oio.a
test/run-benchmarks$(E): test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) oio.a
$(CC) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-benchmarks test/run-benchmarks.c \
test/runner.c $(RUNNER_SRC) $(BENCHMARKS) oio.a
@ -48,3 +48,6 @@ test: test/run-tests
bench: test/run-benchmarks
test/run-benchmarks
clean:
$(RM) -f *.o *.a test/run-tests$(E) test/run-benchmarks$(E)

View File

@ -18,6 +18,12 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Use make -f Makefile.gcc PREFIX=i686-w64-mingw32-
# for cross compilation
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
E=.exe
CFLAGS=-g --std=gnu89
LINKFLAGS=-lm
TESTS=test/echo-server.c test/test-*.c
@ -33,8 +39,5 @@ oio.a: oio-win.o
oio-win.o: oio-win.c oio.h oio-win.h
$(CC) $(CFLAGS) -c oio-win.c -o oio-win.o
clean:
$(RM) -f *.o *.a test/run-tests.exe test/run-benchmarks.exe
distclean:
$(RM) -f *.o *.a

View File

@ -18,6 +18,9 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
E=
CFLAGS=--std=gnu89 -g
LINKFLAGS=-lm
TESTS=test/echo-server.c test/test-*.c
@ -39,10 +42,6 @@ ev/ev.o: ev/config.h ev/ev.c
ev/config.h:
cd ev && ./configure
clean:
$(RM) -f *.o *.a test/run-tests test/run-benchmarks
$(MAKE) -C ev clean
distclean:
$(RM) -f *.o *.a
$(MAKE) -C ev clean