mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
a1c50f9316
actually work (and be used) - Trim Makefile header and remove an indefinite article from COMMENT line - No need for a fancy, environment-aware "make clean" when all it does is it does is just "rm -rf nsfobj" - Define LICENSE (GPLv2), adjust WWW: line in port description while here Reported by: marino
74 lines
1.8 KiB
Plaintext
74 lines
1.8 KiB
Plaintext
--- Makefile.orig Wed Sep 24 11:02:34 2003
|
|
+++ Makefile Wed Sep 24 19:43:19 2003
|
|
@@ -1,11 +1,10 @@
|
|
################################
|
|
# Configuration
|
|
|
|
-CC = gcc
|
|
-CFLAGS =
|
|
-LDFLAGS = -lm
|
|
-PREFIX = /usr/local
|
|
-WANT_DEBUG=TRUE
|
|
+CC ?= gcc
|
|
+CFLAGS ?=
|
|
+LDFLAGS ?= -lm
|
|
+PREFIX ?= /usr/local
|
|
|
|
# nothing below here should need to be changed
|
|
|
|
@@ -21,19 +20,13 @@ SRCDIR = src
|
|
|
|
CFLAGS += -DNSF_PLAYER
|
|
|
|
-ifeq "$(WANT_DEBUG)" "TRUE"
|
|
- CFLAGS += -ggdb
|
|
-else
|
|
- CFLAGS += -O2 -fomit-frame-pointer -ffast-math -funroll-loops
|
|
- DEBUG_OBJECTS =
|
|
-endif
|
|
-
|
|
CFLAGS +=\
|
|
-I$(SRCDIR)\
|
|
-I$(SRCDIR)/linux\
|
|
-I$(SRCDIR)/sndhrdw\
|
|
-I$(SRCDIR)/machine\
|
|
-I$(SRCDIR)/cpu/nes6502\
|
|
+ -I$(LOCALBASE)/include\
|
|
-I$(BUILDTOP)\
|
|
-I/usr/local/include/
|
|
|
|
@@ -59,6 +52,8 @@ SRCS = $(addsuffix .c, $(FILES) linux/ma
|
|
SOURCES = $(addprefix $(SRCDIR)/, $(SRCS))
|
|
OBJECTS = $(patsubst $(SRCDIR)/%.c,$(BUILDDIR)/%.o,$(SOURCES))
|
|
|
|
+LDLIBS = -lm
|
|
+
|
|
ALL_OBJECTS = $(OBJECTS)
|
|
|
|
ALL_TARGETS = $(BUILDTOP)/$(NAME)
|
|
@@ -82,12 +77,13 @@ $(BUILDTOP)/config.h: $(BUILDDIR) Makefi
|
|
|
|
$(BUILDDIR)/dep: $(BUILDTOP)/config.h
|
|
$(CC) $(NSFINFO_CFLAGS) $(CFLAGS) -M $(SOURCES) > $@
|
|
+dep: $(BUILDDIR)/dep
|
|
|
|
--include $(BUILDDIR)/dep/
|
|
+-include $(BUILDDIR)/dep
|
|
|
|
install: all
|
|
mkdir -p $(PREFIX)/bin
|
|
- cp $(ALL_TARGETS) $(PREFIX)/bin
|
|
+ $(INSTALL) $(COPY) $(STRIP) -g $(BINGRP) -m $(BINMODE) -o $(BINOWN) $(BUILDTOP)/$(NAME) $(PREFIX)/bin
|
|
@echo "-----------------------------------------------"
|
|
@echo "Be sure to run chmod +s $(PREFIX)/bin/$(NAME) if you want ordinary users"
|
|
@echo "to be able to use /dev/dsp. SUID isn't necessary, though, if you want to"
|
|
@@ -105,7 +101,7 @@ clean:
|
|
# The real heavy lifting
|
|
|
|
$(BUILDTOP)/$(NAME): $(OBJECTS)
|
|
- $(CC) $(NSFINFO_CFLAGS) $(LDFLAGS) -o $@ $^
|
|
+ $(CC) $(NSFINFO_CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
$(BUILDDIR)/%.o: $(SRCDIR)/%.c
|
|
$(CC) $(NSFINFO_CFLAGS) -o $@ -c $<
|