Skip to content

Commit f279a34

Browse files
committed
rename gui to nsfplay, will recreate gui as a common library for stand-alone + plugin
1 parent 831f1b2 commit f279a34

File tree

12 files changed

+75
-68
lines changed

12 files changed

+75
-68
lines changed

gui/makefile

Lines changed: 0 additions & 54 deletions
This file was deleted.

makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
include makefile.common
22

3-
.PHONY: default core cmd gui winamp install uninstall clean
3+
.PHONY: default core cmd gui nsfplay winamp install uninstall clean
44

5-
default: core cmd gui
5+
default: core cmd nsfplay
66

77
ifeq ($(OS),Windows_NT)
88
default: winamp
@@ -17,16 +17,19 @@ cmd: core
1717
gui: core
1818
$(MAKE) -C gui
1919

20+
nsfplay: core
21+
$(MAKE) -C nsfplay
22+
2023
winamp: core
2124
$(MAKE) -C winamp
2225

2326
install: cmd
2427
$(MAKE) -C cmd install
25-
$(MAKE) -C gui install
28+
$(MAKE) -C nsfplay install
2629

2730
uninstall:
2831
$(MAKE) -C cmd uninstall
29-
$(MAKE) -C gui uninstall
32+
$(MAKE) -C nsfplay uninstall
3033

3134
clean:
3235
rm -rf $(INTDIR)

makefile.common

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CXXFLAGS += -I../include -O3 -Wall -Werror -g
1111
LDFLAGS += -Wl,--fatal-warnings -g
1212
LDFLAGS_CMD +=
1313
LDFLAGS_GUI +=
14+
LDFLAGS_NSFPLAY +=
1415
LDFLAGS_DLL +=
1516

1617
LIB_SUFFIX ?= .a
@@ -19,7 +20,8 @@ DLL_SUFFIX ?= .dll
1920

2021
LIB_NAME ?= nsfcore
2122
CMD_NAME ?= nsfplac
22-
GUI_NAME ?= nsfplay
23+
GUI_NAME ?= nsfgui
24+
NSFPLAY_NAME ?= nsfplay
2325
WINAMP_NAME ?= nsfplay
2426

2527
STRIP_DEBUG = \
@@ -31,6 +33,6 @@ ifeq ($(OS),Windows_NT)
3133
CXXFLAGS += -municode
3234
LDFLAGS += -static-libgcc
3335
LDFLAGS_CMD += -mconsole
34-
LDFLAGS_GUI += -municode -mwindows
36+
LDFLAGS_NSFPLAY += -municode -mwindows
3537
LDFLAGS_DLL += -municode -mdll
3638
endif

nsfplay.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winamp", "winamp\winamp.vcx
1515
{E492BA81-E2F5-439C-B42E-A3E26C82DDFB} = {E492BA81-E2F5-439C-B42E-A3E26C82DDFB}
1616
EndProjectSection
1717
EndProject
18-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gui", "gui\gui.vcxproj", "{D3EC4B41-9124-4C7E-B2B8-01E85EEC750D}"
18+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsfplay", "nsfplay\nsfplay.vcxproj", "{D3EC4B41-9124-4C7E-B2B8-01E85EEC750D}"
1919
ProjectSection(ProjectDependencies) = postProject
2020
{E492BA81-E2F5-439C-B42E-A3E26C82DDFB} = {E492BA81-E2F5-439C-B42E-A3E26C82DDFB}
2121
EndProjectSection

nsfplay/makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
include ../makefile.common
2+
3+
TARGETFILE ?= $(NSFPLAY_NAME)$(EXE_SUFFIX)
4+
TARGET ?= ../$(OUTDIR)/$(TARGETFILE)
5+
NSFPLAY_INTDIR ?= ../$(INTDIR)/nsfplay
6+
NSFPLAY_INSTALL = $(prefix)/$(TARGETFILE)
7+
8+
.PHONY: default install uninstall clean
9+
10+
default: $(TARGET)
11+
12+
SRCS = $(wildcard *.cpp)
13+
OBJS = $(addprefix $(NSFPLAY_INTDIR)/,$(SRCS:.cpp=.o))
14+
DEPS = $(addprefix $(NSFPLAY_INTDIR)/,$(SRCS:.cpp=.d))
15+
CORE = ../$(OUTDIR)/$(LIB_NAME)$(LIB_SUFFIX)
16+
17+
ifeq ($(OS),Windows_NT)
18+
OBJS += $(NSFPLAY_INTDIR)/nsfplay_rc.o
19+
endif
20+
21+
$(TARGET): $(OBJS) $(CORE) | $(dir $(TARGET))
22+
$(CXX) -o $(TARGET) $(LDFLAGS) $(LDFLAGS_NSFPLAY) $(OBJS) $(CORE)
23+
$(STRIP_DEBUG)
24+
25+
$(NSFPLAY_INTDIR)/%.d: %.cpp | $(NSFPLAY_INTDIR)/
26+
$(CXX) -M -MM -MF $@ -MT $(NSFPLAY_INTDIR)/$(basename $<).o $(CXXFLAGS) -c $<
27+
28+
$(NSFPLAY_INTDIR)/%.o: %.cpp $(NSFPLAY_INTDIR)/%.d | $(NSFPLAY_INTDIR)/
29+
$(CXX) -o $@ $(CXXFLAGS) -c $<
30+
31+
$(NSFPLAY_INTDIR)/nsfplay_rc.o: nsfplay.rc *.ico | $(NSFPLAY_INTDIR)/
32+
windres -i $< -o $@
33+
34+
$(NSFPLAY_INTDIR)/:
35+
$(MKDIR) $@
36+
37+
$(dir $(TARGET)):
38+
$(MKDIR) $@
39+
40+
$(CORE):
41+
$(MAKE) -C ../core
42+
43+
install: $(TARGET)
44+
$(MKDIR) $(dir $(NSFPLAY_INSTALL))
45+
cp $(TARGET) $(NSFPLAY_INSTALL)
46+
47+
uninstall:
48+
rm -f $(NSFPLAY_INSTALL)
49+
50+
clean:
51+
rm -rf $(NSFPLAY_INTDIR)
52+
rm -rf $(dir $(TARGET))
53+
54+
include $(DEPS)
File renamed without changes.
File renamed without changes.
File renamed without changes.

gui/gui.vcxproj renamed to nsfplay/nsfplay.vcxproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
<VCProjectVersion>16.0</VCProjectVersion>
2323
<Keyword>Win32Proj</Keyword>
2424
<ProjectGuid>{d3ec4b41-9124-4c7e-b2b8-01e85eec750d}</ProjectGuid>
25-
<RootNamespace>gui</RootNamespace>
25+
<RootNamespace>nsfplay</RootNamespace>
2626
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
<ProjectName>nsfplay</ProjectName>
2728
</PropertyGroup>
2829
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2930
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -170,10 +171,10 @@
170171
<ClInclude Include="resource.h" />
171172
</ItemGroup>
172173
<ItemGroup>
173-
<ClCompile Include="gui.cpp" />
174+
<ClCompile Include="nsfplay.cpp" />
174175
</ItemGroup>
175176
<ItemGroup>
176-
<ResourceCompile Include="gui.rc" />
177+
<ResourceCompile Include="nsfplay.rc" />
177178
</ItemGroup>
178179
<ItemGroup>
179180
<Image Include="nsfplay.ico" />

gui/gui.vcxproj.filters renamed to nsfplay/nsfplay.vcxproj.filters

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
</ClInclude>
2121
</ItemGroup>
2222
<ItemGroup>
23-
<ClCompile Include="gui.cpp">
23+
<ClCompile Include="nsfplay.cpp">
2424
<Filter>Source Files</Filter>
2525
</ClCompile>
2626
</ItemGroup>
2727
<ItemGroup>
28-
<ResourceCompile Include="gui.rc">
28+
<ResourceCompile Include="nsfplay.rc">
2929
<Filter>Resource Files</Filter>
3030
</ResourceCompile>
3131
</ItemGroup>
File renamed without changes.

readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ Make targets:
1313
* `make clean` - deletes `intermediate` and `output` directories.
1414
* `make core` - build core library `nsfcore` to `output/make`.
1515
* `make cmd` - build `nsfplac` to `output/make`.
16-
* `make gui` - build `nsfplay` to `output/make`.
16+
* `make gui` - build gui library `nsfgui` to `output/make`.
17+
* `make nsfplay` - build `nsfplay` to `output/make`.
1718
* `make winamp` - (windows only) build `nsfplay.dll` winamp plugin to `output/make`.
1819
* `make install` - copy `nsfplay`/`nsfplaycmd` to `/usr/local/bin`.
1920
* `make uninstall` - delete install from `/usr/local/bin`.
2021
* `make install prefix=~/my/directory` - install to custom directory.
2122
* `make uninstall prefix=~/my/directory` - uninstall from custom directory.
2223

23-
See `makefile.common` for various potential environment overrides.
24+
See `makefile.common` for various potential environment overrides.

0 commit comments

Comments
 (0)