aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-08-28 15:16:12 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-08-28 15:30:25 +0100
commite35cff6d299a07d9b34f303717083a9299a37e82 (patch)
tree7204099ad4978dfc67e04bc11df29d0f366af851 /src/Makefile
downloaduboxlib-dos-e35cff6d299a07d9b34f303717083a9299a37e82.tar.gz
uboxlib-dos-e35cff6d299a07d9b34f303717083a9299a37e82.zip
Initial import
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..c6a5651
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,36 @@
+ifeq ($(LIBMIKMOD_BASE),)
+$(error Set LIBMIKMOD_BASE variable to libmikmod base directory)
+endif
+
+LIB := ../libubox.a
+CC := i586-pc-msdosdjgpp-gcc
+CFLAGS := -I./ -I$(LIBMIKMOD_BASE)/include -I../include -Wall -Werror -pedantic -O3 -fomit-frame-pointer -ffast-math -march=i386 -DDEBUG
+
+AR := ar
+ARFLAGS := cr
+RANLIB := ranlib
+
+SRCS := $(wildcard *.c)
+OBJS := $(SRCS:.c=.o)
+
+all: $(LIB)
+
+$(LIB): $(OBJS)
+ $(AR) $(ARFLAGS) $@ $^
+ $(RANLIB) $@
+
+.c.o:
+ $(CC) -c $(CFLAGS) $< -o $@
+
+clean:
+ rm -f *.o Makefile.deps
+
+cleanall: clean
+ rm -f $(LIB)
+
+Makefile.deps: $(SRCS)
+ $(CC) $(CFLAGS) -MM *.[ch] > Makefile.deps
+
+.PHONY: all clean cleanall
+
+include Makefile.deps