Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:goupilmtos:2024:games
2h4u
better-makefile.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File better-makefile.patch of Package 2h4u
diff -Nur 2H4U/scripts/Makefile new/scripts/Makefile --- 2H4U/scripts/Makefile 2006-06-30 12:57:46.000000000 +0200 +++ new/scripts/Makefile 2016-08-30 22:04:36.265061185 +0200 @@ -1,61 +1,41 @@ #! /bin/sh -OBJECTS = ../objs/Engine.o ../objs/bonus.o ../objs/highscore.o ../objs/launcher.o ../objs/son.o ../objs/Param.o ../objs/brick.o ../objs/intro.o ../objs/main.o ../objs/terrain.o ../objs/balle.o ../objs/figure.o ../objs/jeu.o ../objs/menu.o -TARGET = ../2H4U -LIBS = $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -lSDL_ttf +OBJECTS = ../objs/Engine.o ../objs/bonus.o ../objs/highscore.o \ + ../objs/launcher.o ../objs/son.o ../objs/Param.o \ + ../objs/brick.o ../objs/intro.o ../objs/main.o \ + ../objs/terrain.o ../objs/balle.o ../objs/figure.o \ + ../objs/jeu.o ../objs/menu.o + +TARGET := ../2H4U + +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +DATADIR ?= $(PREFIX)/share/2H4U + +PKG_CONFIG ?= pkg-config +CXX ?= g++ + +LIBS := $(shell $(PKG_CONFIG) --libs sdl SDL_image SDL_mixer SDL_ttf) $(LDFLAGS) +cxxflags := $(shell $(PKG_CONFIG) --cflags sdl SDL_image SDL_mixer SDL_ttf) -DDATADIR="\"$(DATADIR)/\"" $(CXXFLAGS) all: dirs $(OBJECTS) - g++ $(LIBS) -o $(TARGET) $(OBJECTS) + $(CXX) -o $(TARGET) $(OBJECTS) $(LIBS) dirs: mkdir -p ../objs -../objs/Engine.o: ../sources/Engine.cpp - g++ -o $@ -c $< - -../objs/bonus.o: ../sources/bonus.cpp - g++ -o $@ -c $< - -../objs/highscore.o: ../sources/highscore.cpp - g++ -o $@ -c $< - -../objs/launcher.o: ../sources/launcher.cpp - g++ -o $@ -c $< - -../objs/son.o: ../sources/son.cpp - g++ -o $@ -c $< - -../objs/Param.o: ../sources/Param.cpp - g++ -o $@ -c $< - -../objs/brick.o: ../sources/brick.cpp - g++ -o $@ -c $< - -../objs/intro.o: ../sources/intro.cpp - g++ -o $@ -c $< - -../objs/main.o: ../sources/main.cpp - g++ -o $@ -c $< - -../objs/terrain.o: ../sources/terrain.cpp - g++ -o $@ -c $< - -../objs/balle.o: ../sources/balle.cpp - g++ -o $@ -c $< - -../objs/figure.o: ../sources/figure.cpp - g++ -o $@ -c $< - -../objs/jeu.o: ../sources/jeu.cpp - g++ -o $@ -c $< - -../objs/menu.o: ../sources/menu.cpp - g++ -o $@ -c $< - +../objs/%.o: ../sources/%.cpp + $(CXX) -o $@ -c $(cxxflags) $< + rebuild: superclean all - + +install: all + install -D -m 0755 $(TARGET) $(DESTDIR)$(BINDIR)/2H4U + install -d -m 0755 $(DESTDIR)$(DATADIR) + cp -R ../data/* $(DESTDIR)$(DATADIR) + clean: rm -rf $(OBJECTS)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor