Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1015)

Unified Diff: third_party/dlfcn-win32/Makefile

Issue 137143003: Add dlfcn-win32 to third_party (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/deps/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/dlfcn-win32/COPYING ('k') | third_party/dlfcn-win32/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/dlfcn-win32/Makefile
===================================================================
--- third_party/dlfcn-win32/Makefile (revision 0)
+++ third_party/dlfcn-win32/Makefile (revision 0)
@@ -0,0 +1,69 @@
+#
+# dlfcn-win32 Makefile
+#
+include config.mak
+
+ifeq ($(BUILD_SHARED),yes)
+ TARGETS+=libdl.dll
+ SHFLAGS+=-Wl,--out-implib,libdl.dll.a
+ INSTALL+=shared-install
+endif
+ifeq ($(BUILD_STATIC),yes)
+ TARGETS+=libdl.a
+ INSTALL+=static-install
+endif
+ifeq ($(BUILD_MSVC),yes)
+ SHFLAGS+=-Wl,--output-def,libdl.def
+ INSTALL+=lib-install
+endif
+
+all: $(TARGETS)
+
+dlfcn.o:
+ $(CC) -o dlfcn.o -c dlfcn.c -Wall -O3 -fomit-frame-pointer
+
+libdl.a: dlfcn.o
+ $(AR) cru libdl.a dlfcn.o
+ $(RANLIB) libdl.a
+
+libdl.dll: dlfcn.o
+ $(CC) $(SHFLAGS) -shared -o libdl.dll dlfcn.o
+ $(LIBCMD) /machine:i386 /def:libdl.def
+
+shared-install:
+ mkdir -p $(DESTDIR)$(prefix)/bin
+ cp libdl.dll $(DESTDIR)$(prefix)/bin
+ $(STRIP) $(DESTDIR)$(prefix)/bin/libdl.dll
+ mkdir -p $(DESTDIR)$(libdir)
+ cp libdl.dll.a $(DESTDIR)$(libdir)
+ mkdir -p $(DESTDIR)$(incdir)
+ cp dlfcn.h $(DESTDIR)$(incdir)
+
+static-install:
+ mkdir -p $(DESTDIR)$(libdir)
+ cp libdl.a $(DESTDIR)$(libdir)
+ mkdir -p $(DESTDIR)$(incdir)
+ cp dlfcn.h $(DESTDIR)$(incdir)
+
+lib-install:
+ mkdir -p $(DESTDIR)$(libdir)
+ cp libdl.lib $(DESTDIR)$(libdir)
+
+install: $(INSTALL)
+
+test.exe:
+ $(CC) -o test.exe test.c -L. -ldl
+
+testdll.dll:
+ $(CC) -shared -o testdll.dll testdll.c
+
+test: $(TARGETS) test.exe testdll.dll
+ test.exe
+
+clean::
+ rm -f dlfcn.o libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp test.exe testdll.dll
+
+distclean: clean
+ rm -f config.mak
+
+.PHONY: clean distclean install test
Property changes on: third_party/dlfcn-win32/Makefile
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « third_party/dlfcn-win32/COPYING ('k') | third_party/dlfcn-win32/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698