]> git.tuebingen.mpg.de Git - osl.git/blobdiff - Makefile
build: Combine CFLAGS and LIBCFLAGS.
[osl.git] / Makefile
index ba61ef7769a258d2f2453d52fa5b374f54711553..92e66c1e4e10889a68e5ebf517f3b7aa22cedce1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,25 +42,14 @@ CFLAGS += -Werror-implicit-function-declaration
 CFLAGS += -Wmissing-format-attribute
 CFLAGS += -Wunused-macros
 CFLAGS += -Wbad-function-cast
-
-# cflags used only for building library objects
-LIBCFLAGS += -fPIC
-LIBCFLAGS += -fvisibility=hidden
+CFLAGS += -fPIC
+CFLAGS += -fvisibility=hidden
 
 libname := osl
 
-ifeq ($(uname_s),Linux)
-       LDFLAGS += -Wl,-soname,$(soname)
-       # disallow undefined symbols
-       LDFLAGS += -Wl,-z,defs
-endif
-ifeq ($(uname_s),NetBSD)
-       LDFLAGS += -Wl,-soname,$(soname)
-endif
-
-ifeq ($(uname_s),FreeBSD)
-       LDFLAGS += -Wl,-soname,$(soname)
-endif
+LDFLAGS += -Wl,-soname,$(soname)
+# disallow undefined symbols
+LDFLAGS += -Wl,-z,defs
 
 # On ELf-based systems, the following conventions apply (see dhweeler's
 # Program Library HOWTO):
@@ -87,7 +76,7 @@ ifeq ($(findstring clean, $(MAKECMDGOALS)),)
 -include $(deps)
 endif
 %.o: %.c Makefile errtab.h
-       $(CC) $(CPPFLAGS) -c -MMD -MF $(*F).d -MT $@ $(CFLAGS) $(LIBCFLAGS) $<
+       $(CC) $(CPPFLAGS) -c -MMD -MF $(*F).d -MT $@ $(CFLAGS) $<
 
 fsck.o: oslfsck.lsg.h
 oslfsck: $(fsck_objects)