summaryrefslogtreecommitdiffstats
path: root/testing/mozbase/mozprocess/tests/iniparser/Makefile
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/mozbase/mozprocess/tests/iniparser/Makefile
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/mozbase/mozprocess/tests/iniparser/Makefile')
-rw-r--r--testing/mozbase/mozprocess/tests/iniparser/Makefile85
1 files changed, 85 insertions, 0 deletions
diff --git a/testing/mozbase/mozprocess/tests/iniparser/Makefile b/testing/mozbase/mozprocess/tests/iniparser/Makefile
new file mode 100644
index 000000000..48c86f9d6
--- /dev/null
+++ b/testing/mozbase/mozprocess/tests/iniparser/Makefile
@@ -0,0 +1,85 @@
+#
+# iniparser Makefile
+#
+
+# source files
+SRCS = iniparser.c \
+ dictionary.c
+
+# include rules for platform determination
+include platform.mk
+
+# flags for the the various systems
+ifeq ($(UNAME), Linux)
+ # Compiler settings
+ CC = gcc
+ AR = ar
+ ARFLAGS = rcv
+ SHLD = ${CC} ${CFLAGS}
+ CFLAGS = -O2 -fPIC -Wall -ansi -pedantic
+ LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+ LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+endif
+ifeq ($(UNAME), Darwin)
+ # Compiler settings
+ CC = gcc
+ # Ar settings to build the library
+ AR = ar
+ ARFLAGS = rcv
+ SHLD = libtool
+ CFLAGS = -v -arch i386 -fPIC -Wall -ansi -pedantic
+ LDFLAGS = -arch_only i386
+endif
+ifeq ($(WIN32), 1)
+ CC = cl
+ CFLAGS = //Od //D "_WIN32" //D "WIN32" //D "_CONSOLE" //D "_CRT_SECURE_NO_WARNINGS" //D "_UNICODE" //D "UNICODE" //Gm //EHsc //RTC1 //MDd //W3 //nologo //c //ZI //TC
+ LDFLAGS = //OUT:"iniparser.lib" //NOLOGO
+ LINK = lib
+ RM = rm -f
+endif
+
+# windows build rules
+ifeq ($(WIN32), 1)
+
+COMPILE.c = $(CC) $(CFLAGS) -c
+OBJS = $(SRCS:.c=.obj)
+
+all: iniparser.obj dictionary.obj iniparser.lib
+
+iniparser.obj: dictionary.obj
+ @($(CC) $(CFLAGS) iniparser.c)
+
+dictionary.obj:
+ @(echo "compiling dictionary; WIN32: $(WIN32); platform: $(UNAME)")
+ @($(CC) $(CFLAGS) dictionary.c)
+
+iniparser.lib: dictionary.obj iniparser.obj
+ @(echo "linking $(OBJS)")
+ @($(LINK) $(LDFLAGS) $(OBJS))
+else
+
+# *nix (and Mac) build rules
+RM = rm -f
+COMPILE.c = $(CC) $(CFLAGS) -c
+OBJS = $(SRCS:.c=.o)
+
+all: libiniparser.a libiniparser.so
+
+.c.o:
+ @(echo "platform: $(UNAME), WIN32=$(WIN32); compiling $< ...")
+ @($(COMPILE.c) -o $@ $<)
+
+libiniparser.a: $(OBJS)
+ @($(AR) $(ARFLAGS) libiniparser.a $(OBJS))
+
+ifeq ($(UNAME), Linux)
+libiniparser.so: $(OBJS)
+ @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS)
+else
+libiniparser.so: $(OBJS)
+ @$(SHLD) -o $@.0 $(LDFLAGS) $(OBJS)
+endif
+endif
+
+clean:
+ $(RM) $(OBJS) libiniparser.*