diff --git a/Makefile b/Makefile index b4a05df..adb4af9 100644 --- a/Makefile +++ b/Makefile @@ -31,15 +31,13 @@ dist: $(PACKAGE)-$(VERSION)/doc/gtkdoc/Makefile \ $(PACKAGE)-$(VERSION)/doc/gtkdoc/libApp-docs.xml \ $(PACKAGE)-$(VERSION)/doc/gtkdoc/project.conf \ + $(PACKAGE)-$(VERSION)/include/App.h \ $(PACKAGE)-$(VERSION)/include/Makefile \ $(PACKAGE)-$(VERSION)/include/project.conf \ - $(PACKAGE)-$(VERSION)/include/System/App.h \ - $(PACKAGE)-$(VERSION)/include/System/Makefile \ - $(PACKAGE)-$(VERSION)/include/System/project.conf \ - $(PACKAGE)-$(VERSION)/include/System/App/appclient.h \ - $(PACKAGE)-$(VERSION)/include/System/App/appserver.h \ - $(PACKAGE)-$(VERSION)/include/System/App/Makefile \ - $(PACKAGE)-$(VERSION)/include/System/App/project.conf \ + $(PACKAGE)-$(VERSION)/include/App/appclient.h \ + $(PACKAGE)-$(VERSION)/include/App/appserver.h \ + $(PACKAGE)-$(VERSION)/include/App/Makefile \ + $(PACKAGE)-$(VERSION)/include/App/project.conf \ $(PACKAGE)-$(VERSION)/src/appclient.c \ $(PACKAGE)-$(VERSION)/src/appinterface.c \ $(PACKAGE)-$(VERSION)/src/appserver.c \ diff --git a/include/System/App.h b/include/App.h similarity index 92% rename from include/System/App.h rename to include/App.h index 92f0e2c..1d45767 100644 --- a/include/System/App.h +++ b/include/App.h @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2011 Pierre Pronchery */ +/* Copyright (c) 2011-2012 Pierre Pronchery */ /* This file is part of DeforaOS System libApp */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/System/App/Makefile b/include/App/Makefile similarity index 100% rename from include/System/App/Makefile rename to include/App/Makefile diff --git a/include/System/App/appclient.h b/include/App/appclient.h similarity index 100% rename from include/System/App/appclient.h rename to include/App/appclient.h diff --git a/include/System/App/appserver.h b/include/App/appserver.h similarity index 100% rename from include/System/App/appserver.h rename to include/App/appserver.h diff --git a/include/System/App/project.conf b/include/App/project.conf similarity index 100% rename from include/System/App/project.conf rename to include/App/project.conf diff --git a/include/Makefile b/include/Makefile index 9d0a212..0bf7dd3 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,4 +1,11 @@ -SUBDIRS = System +SUBDIRS = App +PREFIX = /usr/local +DESTDIR = +RM ?= rm -f +LN ?= ln -f +MKDIR ?= mkdir -p +INSTALL ?= install +INCLUDEDIR= $(PREFIX)/include all: subdirs @@ -14,8 +21,11 @@ distclean: install: @for i in $(SUBDIRS); do (cd $$i && $(MAKE) install) || exit; done + $(MKDIR) $(DESTDIR)$(INCLUDEDIR)/System + $(INSTALL) -m 0644 -- App.h $(DESTDIR)$(INCLUDEDIR)/System/App.h uninstall: @for i in $(SUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit; done + $(RM) -- $(DESTDIR)$(INCLUDEDIR)/System/App.h .PHONY: all subdirs clean distclean install uninstall diff --git a/include/System/Makefile b/include/System/Makefile deleted file mode 100644 index 0bf7dd3..0000000 --- a/include/System/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -SUBDIRS = App -PREFIX = /usr/local -DESTDIR = -RM ?= rm -f -LN ?= ln -f -MKDIR ?= mkdir -p -INSTALL ?= install -INCLUDEDIR= $(PREFIX)/include - - -all: subdirs - -subdirs: - @for i in $(SUBDIRS); do (cd $$i && $(MAKE)) || exit; done - -clean: - @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done - -distclean: - @for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done - -install: - @for i in $(SUBDIRS); do (cd $$i && $(MAKE) install) || exit; done - $(MKDIR) $(DESTDIR)$(INCLUDEDIR)/System - $(INSTALL) -m 0644 -- App.h $(DESTDIR)$(INCLUDEDIR)/System/App.h - -uninstall: - @for i in $(SUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit; done - $(RM) -- $(DESTDIR)$(INCLUDEDIR)/System/App.h - -.PHONY: all subdirs clean distclean install uninstall diff --git a/include/System/project.conf b/include/System/project.conf deleted file mode 100644 index 577cbf9..0000000 --- a/include/System/project.conf +++ /dev/null @@ -1,6 +0,0 @@ -subdirs=App -includes=App.h -dist=Makefile - -[App.h] -install=$(INCLUDEDIR)/System diff --git a/include/project.conf b/include/project.conf index a8fcfce..577cbf9 100644 --- a/include/project.conf +++ b/include/project.conf @@ -1,2 +1,6 @@ -subdirs=System +subdirs=App +includes=App.h dist=Makefile + +[App.h] +install=$(INCLUDEDIR)/System diff --git a/src/Makefile b/src/Makefile index 83583c3..7412ba9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -33,13 +33,13 @@ libApp.so.0.0 libApp.so.0 libApp.so: $(libApp_OBJS) $(LN) -s -- libApp.so.0.0 libApp.so.0 $(LN) -s -- libApp.so.0.0 libApp.so -appclient.o: appclient.c appinterface.h ../include/System/App/appclient.h common.h +appclient.o: appclient.c appinterface.h ../include/App/appclient.h common.h $(CC) $(libApp_CFLAGS) -c appclient.c -appinterface.o: appinterface.c ../include/System/App/appserver.h ../config.h +appinterface.o: appinterface.c ../include/App/appserver.h ../config.h $(CC) $(libApp_CFLAGS) -c appinterface.c -appserver.o: appserver.c appinterface.h ../include/System/App/appserver.h ../config.h +appserver.o: appserver.c appinterface.h ../include/App/appserver.h ../config.h $(CC) $(libApp_CFLAGS) -c appserver.c common.o: common.c diff --git a/src/project.conf b/src/project.conf index 6af4d9b..6c2bc32 100644 --- a/src/project.conf +++ b/src/project.conf @@ -16,10 +16,10 @@ ldflags=`pkg-config --libs openssl` -lssl -lsocket -lws2_32 install=$(LIBDIR) [appclient.c] -depends=appinterface.h,../include/System/App/appclient.h,common.h +depends=appinterface.h,../include/App/appclient.h,common.h [appinterface.c] -depends=../include/System/App/appserver.h,../config.h +depends=../include/App/appserver.h,../config.h [appserver.c] -depends=appinterface.h,../include/System/App/appserver.h,../config.h +depends=appinterface.h,../include/App/appserver.h,../config.h