Category Archives: Ubuntu

Rekursives make mit getrenntem Object-Verzeichnis

TOPLEVEL = .
SUBDIRS = \
    obj

all : all_sub Aufgabe9

include $(TOPLEVEL)/Makefile.inc

STATIC_LIBRARY = obj/lib.a \
                 obj/planet/lib.a

Aufgabe9 : $(STATIC_LIBRARY)
	$(CC) -o $@ obj/main.o $(STATIC_LIBRARY) $(LDFLAGS)
CC       = g++
AR       = ar
CFLAGS   = `sdl-config --cflags` -I/usr/glew/include -I$(TOPLEVEL)/include -D_REENTRANT -Wall -std=gnu++0x
LDFLAGS  = `sdl-config --libs` -L/usr/glew/lib -lopengl32 -lglu32 -lglew32 -lSDL_ttf
OBJECT   = $(SOURCES:%.cxx=%.o)

# CFLAGS  = -IC:\MinGW\msys\1.0\libsdl\include\SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -I$(TOPLEVEL)/include -D_REENTRANT -Wall
# LDFLAGS = -LC:\MinGW\msys\1.0\libsdl\lib -lmingw32 -lSDLmain -lSDL -mwindows -lopengl32 -lglu32 -lSDL_ttf

all_sub:
	if test "$(SUBDIRS)" != ""; then \
		for subdir in $(SUBDIRS); do \
			(cd $$subdir; make all); \
		done; \
	fi;

clean: clean_sub
	rm -f *.o *.a $(CLEANFILES)

clean_sub:
	if test "$(SUBDIRS)" != ""; then \
		for subdir in $(SUBDIRS); do \
			(cd $$subdir; make clean); \
		done; \
	fi;

$(LIBRARY): $(OBJECT)
	$(AR) rcu $(LIBRARY) $(OBJECT)
#	$(AR) rcs $(LIBRARY) $(OBJECT)

%.o: $(TOPLEVEL)/$(CURRENT)/%.cxx
	$(CC) -c $(CFLAGS) $<

.SILENT: all_sub clean_sub
CURRENT  = src
TOPLEVEL = ..
LIBRARY  = lib.a

SUBDIRS = \
    planet

SOURCES = \
	main.cxx \
	GLSL.cxx \
	textfile.cxx \
	Vector.cxx \
	Matrix.cxx \
	Keyboard.cxx \
	Settings.cxx \
	Game.cxx \
	Camera.cxx \
	Light.cxx \
	Texture.cxx \
	TextureFactory.cxx \
	World.cxx \
	text.cxx \
	Debug.cxx \
	3ds.cxx \
	Ship.cxx \
	Shot.cxx \
	Billboard.cxx \
	Explosion.cxx \
	DisplayList.cxx

include $(TOPLEVEL)/Makefile.inc

all: all_sub $(LIBRARY)
CURRENT  = src/planet
TOPLEVEL = ../..
LIBRARY  = lib.a

SUBDIRS = 

SOURCES = \
	Planet.cxx \
	Ring.cxx \
	Sun.cxx \
	Earth.cxx \
	EarthMoon.cxx \
	Jupiter.cxx \
	Mars.cxx \
	Mercury.cxx \
	Neptun.cxx \
	Pluto.cxx \
	Saturn.cxx \
	Saturnring.cxx \
	Uranus.cxx \
	Venus.cxx

include $(TOPLEVEL)/Makefile.inc

all: all_sub $(LIBRARY)

UNIX commands and tasks for Linux and BSD

Advanced Bash-Scripting Guide – External Filters, Programs and Commands

Basic

  • ls
  • cat
  • tac
  • rev
  • cp
  • mv
  • rm
  • rmdir
  • mkdir
  • chmod
  • chattr
  • ln
  • man
  • info

Complex

  • find
  • xargs
  • expr

Time and Date

  • date
  • zdump
  • time
  • touch
  • at
  • batch
  • cal
  • sleep
  • usleep
  • hwclock
  • clock

Text Processing

  • sort
  • tsort
  • uniq
  • expand
  • unexpand
  • cut
  • paste
  • join
  • head
  • tail
  • grep
  • look
  • sed
  • awk
  • wc
  • tr
  • fold
  • fmt
  • col
  • column
  • colrm
  • nl
  • pr
  • gettext
  • msgfmt
  • iconv
  • recode
  • TeX
  • gs
  • enscript
  • groff
  • tbl
  • eqn
  • lex
  • yacc

UNIX Toolbox: Differences between Linux/BSD/Windows