aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 3ae8f5b..f5b25f9 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
# source files to the SOURCES variable. For objects that only build on
# certain platforms, add those to the SOURCES line for the right platforms.
-SOURCES = catch13~.c filesize.c ftos.c kalashnikov.c mandelbrot~.c mandelbrot.c messages.c openpatch.c ossmixer.c piperead~.c pipewrite~.c receive13~.c receive13.c scramble~.c send13~.c send13.c sfread.c sfwrite13~.c streamin13~.c streamout13~.c strippath.c throw13~.c wavinfo.c
+SOURCES = catch13~.c filesize.c ftos.c kalashnikov.c mandelbrot~.c mandelbrot.c messages.c openpatch.c piperead~.c pipewrite~.c receive13~.c receive13.c scramble~.c send13~.c send13.c sfwrite13~.c streamin13~.c streamout13~.c strippath.c throw13~.c wavinfo.c
LIBRARY_NAME = $(shell basename $(PWD))
@@ -39,7 +39,8 @@ ifeq (MINGW,$(findstring MINGW,$(UNAME)))
EXTENSION = dll
OS = windows
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -march=i686 -mtune=pentium4
- CFLAGS += -mms-bitfields
+ WINDOWS_HACKS = -D'O_NONBLOCK=1'
+ CFLAGS += -mms-bitfields $(WINDOWS_HACKS)
LDFLAGS += -s -shared
LIBS += -L$(pd_src)/bin -L$(pd_src)/obj -lpd -lwsock32 -lkernel32 -luser32 -lgdi32
STRIP = strip --strip-unneeded -R .note -R .comment
@@ -51,12 +52,6 @@ CFLAGS += $(OPT_CFLAGS)
all: $(SOURCES:.c=.$(EXTENSION))
-$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o
- $(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS)
- chmod a-x $(LIBRARY_NAME).$(EXTENSION)
- $(STRIP) $(LIBRARY_NAME).$(EXTENSION)
- rm -f -- $*.o
-
%.o: %.c
$(CC) $(CFLAGS) -o "$*.o" -c "$*.c"
@@ -66,6 +61,12 @@ $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o
$(STRIP) $*.$(EXTENSION)
rm -f -- $*.o
+$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o
+ $(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS)
+ chmod a-x $(LIBRARY_NAME).$(EXTENSION)
+ $(STRIP) $(LIBRARY_NAME).$(EXTENSION)
+ rm -f -- $*.o
+
clean:
-rm -f -- $(SOURCES:.c=.o)